Solved

# Inserting Image and Text into the same Excel Box

Posted on 2014-01-16
231 Views
Hello Excel Experts.

I am using Excel 2007 for windows.

I have some cells where I want to insert both text and images.

What is the best method to do this.

Thanks!

Rowby
0
Question by:Rowby Goren

LVL 26

Accepted Solution

You can't. You cannot put pictures "in" a cell, only "over" it. All pictures "float" on the worksheet. You can position a picture over a cell by setting its Top and Left properties to the Top and Left of the cell. Then you could insert text in any cell including directly above or beneath the picture.

Set p = ws.Pictures.Insert("C:\Sample.jpg")

Set objRng = ws.Range("A2:B5")
With p
.Top = objRng.Top
.Left = objRng.Left
.Width = objRng.Width
.Height = objRng.Height
End With

ws.Range("A1").Value = "myTop"
ws.Range("B6").Value = "myBottom"
0

LVL 9

Author Comment

Thanks   That clarifies my confusion!
0

## Featured Post

Convert between Excel file formats (.XLS, .XLSX, .XLSM) with/without macro option David Miller (dlmille) Intro Over this past Fall, I've had the opportunity to see several similar requests and have developed a couple related solutions associate…
How to quickly and accurately populate Word documents with Excel data, charts and images (including Automated Bookmark generation) David Miller (dlmille) Synopsis In this article you’ll learn how to use ExcelToWord! to copy data,charts, shapes …
The view will learn how to download and install SIMTOOLS and FORMLIST into Excel, how to use SIMTOOLS to generate a Monte Carlo simulation of 30 sales calls, and how to calculate the conditional probability based on the results of the Monte Carlo …
The viewer will learn how to create a normally distributed random variable in Excel, use a normal distribution to simulate the return on an investment over a period of years, Create a Monte Carlo simulation using a normal random variable, and calcul…