Pull image into a cell based on values in another cell.

RodneyC

Active Member
Joined
Nov 4, 2021
Messages
278
Office Version
  1. 2016
Platform
  1. Windows
I have a column showing text values. I want to be able to pull an image into another cell based on the text value in the other column. Said another way, Let say the value in A1 is 12345. The value in A2 is 13573. The goal is for the formula in B1 to pull a specific image because the A1 value is 12345.

Is this possible? If so, how?

Thanks in advance.
 

Excel Facts

What is =ROMAN(40) in Excel?
The Roman numeral for 40 is XL. Bill "MrExcel" Jelen's 40th book was called MrExcel XL.
It depends on which is the request...
For example, check the following file: GetPicture.xlsx
Sheet2 includes several pictures in column B and an "index" in column A
If you type in Sheet1-A2 one of these indexes the corresponding picture will be displayed in B2

To obtain this:
-a named range GETPICT has been created; its "Refers to" contains the formula =OFFSET(Sheet2!$A$1,MATCH(Sheet1!$A$2,Sheet2!$A$1:$A$100,0)-1,1)
-a picture has been inserted in Sheet1-B2; then, selecting this picture, the formula =GETPICT has been inserted in the formula bar

Now when you insert a valid "index" in Sheet1-A2 (I used 1759 to 1764) the picture in B2 will show the cell in Sheet2-column B at the row that matches Sheet1-A2, whichever its content is (check for example index=1764)

Of course this trick works if you have a set of images stored on sheet2 and one image to retrieve (as in the example); or few images (you will need "few" Images in sheet1 and "few" corresponding named range to associate to each of them)
If you need something more generic than you need vba but a detailed description of which is the expected behaviour is necessary.
 
Upvote 0

Forum statistics

Threads
1,216,108
Messages
6,128,872
Members
449,475
Latest member
Parik11

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top