Datasort JPEGs

Gridhead

New Member
Joined
Aug 30, 2006
Messages
9
I have a jpeg on top of the words "picture a" in Tab #1 of a workbook. I would like this jpeg and "picture a" to be connected so that I can copy them in tandem via a cell formula to other tabs within the workbook. How can I do this?
 

Excel Facts

Whats the difference between CONCAT and CONCATENATE?
The newer CONCAT function can reference a range of cells. =CONCATENATE(A1,A2,A3,A4,A5) becomes =CONCAT(A1:A5)

Derek

Well-known Member
Joined
Feb 16, 2002
Messages
1,592
Hi there

I can think of no way to link cell text to a jpeg and call it via a formula.
You might however like to try something like this:

Right click each sheet tab in turn, left click View Code to open the VB Editor and paste this in the large code window:

Private Sub Worksheet_Change(ByVal Target As Range)
On Error Resume Next
ActiveSheet.Pictures.Insert( _
"C:\Documents and Settings\DEREK\My Documents\My Pictures\" & Target.Value & ".jpeg" _
).Select
Selection.Left = Target.Left
Selection.Top = Target.Top
End Sub

You will need to change this part of the above code to the pathway to your own jpegs:
C:\Documents and Settings\DEREK\My Documents\My Pictures\

Alt+F11 allows you to exit from the VB Editor. Now when you enter the name of a jpeg in a cell, if it exists, it will be inserted into the worksheet with its top left corner covering the cell.

regards
Derek
 

Forum statistics

Threads
1,141,844
Messages
5,708,928
Members
421,599
Latest member
santosh234

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
Top