Hi,
I am trying to find any code that will help me do the following but am coming up stuck at the moment. Basically I have UDF in a workbook that, based on a file path in a specific cell, woul load a JPG into the worksheet.

For example

A1 contains the file path (c:\dropbox\folder\PDH.jpg)
C1 contains the formula =Insertpic(A1)

This all works fine but what I need is to be able to change the PDH.jpg part of the file path name depending on a lookup based on another cell value.

For example

E1 could contain the letters NC in which case I would need the file path to change to c:\dropbox\folder\NC.jpg or they could contain GNI in which case i would need c:\dropbox\folder\GNI.jpg

Any help would be appreciated

Many Thanks