+ Reply to Thread
Results 1 to 5 of 5

Is it possible to insert a picture using formulas?

  1. #1
    Registered User
    Join Date
    12-14-2005
    Posts
    3

    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

  2. #2
    Bernie Deitrick
    Guest

    Re: 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" <[email protected]> wrote in
    message news:[email protected]...
    >
    > 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
    >




  3. #3
    Registered User
    Join Date
    12-14-2005
    Posts
    3

    Smile

    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

  4. #4
    Bernie Deitrick
    Guest

    Re: 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" <[email protected]> wrote in message
    news:[email protected]...
    >
    > 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
    >




  5. #5
    Registered User
    Join Date
    12-14-2005
    Posts
    3

    Brilliant!

    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

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1