ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Worksheet Functions (https://www.excelbanter.com/excel-worksheet-functions/)
-   -   Is it possible to insert a picture using formulas? (https://www.excelbanter.com/excel-worksheet-functions/60481-possible-insert-picture-using-formulas.html)

phil2401

Is it possible to insert a picture using formulas?
 

Hi everyone, is it possible to insert a picture/image into a cell using
formulas alone, i don't want to use macros.

For example:

If cell 'a1' contains the word "yes" then insert image "test.jpg"
(stored on the c:drive) into/onto cell 'B9', if cell 'A1' contains "No"
then do nothing.

I'm trying to insert a scanned signature in a jpg format into a cell if
certain requirements are met in another cell.

I know an easy way is to "insert picture from a file" but I need to
make this fully automatic on several dozen worksheets at once so
inserting manually would be a time consuming job.

Any ideas would be welcome, it may be really simple & I'm becoming
formula blind or it just can't be done without the use of macros.

Many Thanks,
Phil


--
phil2401
------------------------------------------------------------------------
phil2401's Profile: http://www.excelforum.com/member.php...o&userid=29650
View this thread: http://www.excelforum.com/showthread...hreadid=493594


Bernie Deitrick

Is it possible to insert a picture using formulas?
 
Phil,

It just can't be done without the use of macros. Which would be quite easy,
but, hey...

HTH,
Bernie
MS Excel MVP


"phil2401" wrote in
message ...

Hi everyone, is it possible to insert a picture/image into a cell using
formulas alone, i don't want to use macros.

For example:

If cell 'a1' contains the word "yes" then insert image "test.jpg"
(stored on the c:drive) into/onto cell 'B9', if cell 'A1' contains "No"
then do nothing.

I'm trying to insert a scanned signature in a jpg format into a cell if
certain requirements are met in another cell.

I know an easy way is to "insert picture from a file" but I need to
make this fully automatic on several dozen worksheets at once so
inserting manually would be a time consuming job.

Any ideas would be welcome, it may be really simple & I'm becoming
formula blind or it just can't be done without the use of macros.

Many Thanks,
Phil


--
phil2401
------------------------------------------------------------------------
phil2401's Profile:
http://www.excelforum.com/member.php...o&userid=29650
View this thread: http://www.excelforum.com/showthread...hreadid=493594




phil2401

Is it possible to insert a picture using formulas?
 

Thanks for that Bernie, I was right then - my knowledge of macros at
this moment in time is very limited, you say it would be easy - would
you like to share your ideas with an example of any code, then I could
have a "play" and at least broaden my knowledge whilst at the same time
acheiving this little goal.

Many Thanks
Phil


--
phil2401
------------------------------------------------------------------------
phil2401's Profile: http://www.excelforum.com/member.php...o&userid=29650
View this thread: http://www.excelforum.com/showthread...hreadid=493594


Bernie Deitrick

Is it possible to insert a picture using formulas?
 
Phil,

Copy the code below, right-click on the sheet tab where you want all this to happen, select "View
Code", and paste the code into the window that appears. Change the file path and file name to your
actual values.

HTH,
Bernie
MS Excel MVP

Private Sub Worksheet_Change(ByVal Target As Range)
If Target.Cells.Count < 1 Then Exit Sub
If Target.Address < "$A$1" Then Exit Sub
If Target.Value = "Yes" Then
Application.ScreenUpdating = False
Range("B9").Select
ActiveSheet.Pictures.Insert( _
"C:\Documents and Settings\PHIL\My Documents\My Pictures\test.jpg").Select
Selection.Name = "PictureName"
Range("A2").Select
Application.ScreenUpdating = True
Else
On Error Resume Next
ActiveSheet.Shapes("PictureName").Delete
End If
End Sub


"phil2401" wrote in message
...

Thanks for that Bernie, I was right then - my knowledge of macros at
this moment in time is very limited, you say it would be easy - would
you like to share your ideas with an example of any code, then I could
have a "play" and at least broaden my knowledge whilst at the same time
acheiving this little goal.

Many Thanks
Phil


--
phil2401
------------------------------------------------------------------------
phil2401's Profile: http://www.excelforum.com/member.php...o&userid=29650
View this thread: http://www.excelforum.com/showthread...hreadid=493594




phil2401

Is it possible to insert a picture using formulas?
 

Bernie,

Fantastic!, although it may be simple to you I can see I have a long
way to go...this is exactly what I wanted and I'm very grateful.

I'll peruse the coding and try to work out exactly what does what and
in what order.

Just let me take this opportunity to thank you for your help, input and
prompt reply, it's people like you that make these Forums worthwhile,
again Thanks.


Best Regards,
Phil


--
phil2401
------------------------------------------------------------------------
phil2401's Profile: http://www.excelforum.com/member.php...o&userid=29650
View this thread: http://www.excelforum.com/showthread...hreadid=493594



All times are GMT +1. The time now is 05:50 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
ExcelBanter.com