Solved

Inserting Image and Text into the same Excel Box

Posted on 2014-01-16
2
231 Views
Last Modified: 2014-01-16
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
Comment
Question by:Rowby Goren
2 Comments
 
LVL 26

Accepted Solution

by:
MacroShadow earned 500 total points
Comment Utility
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

by:Rowby Goren
Comment Utility
Thanks   That clarifies my confusion!
0

Featured Post

How your wiki can always stay up-to-date

Quip doubles as a “living” wiki and a project management tool that evolves with your organization. As you finish projects in Quip, the work remains, easily accessible to all team members, new and old.
- Increase transparency
- Onboard new hires faster
- Access from mobile/offline

Join & Write a Comment

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…

762 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

10 Experts available now in Live!

Get 1:1 Help Now