+ Reply to Thread
Results 1 to 11 of 11

Swap images depending on text in cell (vlookup for images??)

  1. #1
    Registered User
    Join Date
    05-14-2013
    Location
    southampton
    MS-Off Ver
    Excel 2003
    Posts
    76

    Swap images depending on text in cell (vlookup for images??)

    Hi all,

    I'm trying to get logos to appear around F12 in the Contract Select tab depending on the text (contract) selected in the drop down list - C13 on the same page.

    [See attached - I have one of the logos in the Contracts tab and I'll be places the others next to the other options]

    sample.xlsx


    Is there a vlookup that works on images? I've never done anything like this before..

    Really appreciate any input!

    Many thanks
    Leo
    Last edited by ld2x07; 06-10-2013 at 05:53 AM.

  2. #2
    Forum Expert Jakobshavn's Avatar
    Join Date
    08-17-2012
    Location
    Lakehurst, NJ, USA
    MS-Off Ver
    Excel 2007
    Posts
    1,970

    Re: Swap images depending on text in cell (vlookup for images??)

    Here is a macro-based example. You can adapt it to your needs.
    Make your selection in cell C11. Macros must be enabled for this to work!
    Attached Files Attached Files
    Gary's Student

  3. #3
    Forum Expert Fotis1991's Avatar
    Join Date
    10-11-2011
    Location
    Athens(The homeland of the Democracy!). Greece
    MS-Off Ver
    Excel 1997!&2003 & 2007&2010
    Posts
    13,744

    Re: Swap images depending on text in cell (vlookup for images??)

    And a solution using formulas is here.

    http://www.youtube.com/watch?v=CEM0pp5SjMU
    Regards

    Fotis.

    -This is my Greek whisper to Europe.

    --Remember, saying thanks only takes a second or two. Click the little star * below, to give some Rep if you think an answer deserves it.

    Advanced Excel Techniques: http://excelxor.com/

    --KISS(Keep it simple Stupid)

    --Bring them back.

    ---See about Acropolis of Athens.

    --Visit Greece.

  4. #4
    Registered User
    Join Date
    05-14-2013
    Location
    southampton
    MS-Off Ver
    Excel 2003
    Posts
    76

    Re: Swap images depending on text in cell (vlookup for images??)

    Hi Jakobshavn,

    Thanks for your response.

    I don't have any knowledge of macro at all unfortunately! I don't even know the basics or how to open a macro panel so can't adapt it

  5. #5
    Valued Forum Contributor
    Join Date
    07-17-2005
    Location
    Abergavenny, Wales, UK
    MS-Off Ver
    XL2003, XL2007, XL2010, XL2013, XL2016
    Posts
    608

    Re: Swap images depending on text in cell (vlookup for images??)

    Hi Leo

    You can't achieve it with just a Vlookup function, although you would need that to find the correct image.
    Provided you can accept a VBA solution, take a look at the attached workbook.

    I inserted a new column B to your sheet Contracts, and enter the Image name alongside the Client name

    Then I inserted some event code on sheet Contact Select, as follows

    Please Login or Register  to view this content.
    Attached Files Attached Files
    --
    Regards
    Roger Govier
    Microsoft Excel MVP

  6. #6
    Forum Expert Jakobshavn's Avatar
    Join Date
    08-17-2012
    Location
    Lakehurst, NJ, USA
    MS-Off Ver
    Excel 2007
    Posts
    1,970

    Re: Swap images depending on text in cell (vlookup for images??)

    Hi ld2x07:

    Perhaps you could adopt the technique posted by Fotis1991.

  7. #7
    Forum Expert Fotis1991's Avatar
    Join Date
    10-11-2011
    Location
    Athens(The homeland of the Democracy!). Greece
    MS-Off Ver
    Excel 1997!&2003 & 2007&2010
    Posts
    13,744

    Re: Swap images depending on text in cell (vlookup for images??)

    @ Roger

    With all the respect to your title, have you seen my suggested video?

  8. #8
    Forum Expert Jakobshavn's Avatar
    Join Date
    08-17-2012
    Location
    Lakehurst, NJ, USA
    MS-Off Ver
    Excel 2007
    Posts
    1,970

    Re: Swap images depending on text in cell (vlookup for images??)

    Fotis1991:

    A very nice demonstration!

  9. #9
    Registered User
    Join Date
    05-14-2013
    Location
    southampton
    MS-Off Ver
    Excel 2003
    Posts
    76

    Re: Swap images depending on text in cell (vlookup for images??)

    Hi all,

    Thanks for the feedback.

    I don't have access to sound at the moment which makes the video tricky but I'll have a look at it this evening if i can.

    Roger this code is good but it seems to effect the drop down menu when i try and select another contract..

  10. #10
    Forum Expert Fotis1991's Avatar
    Join Date
    10-11-2011
    Location
    Athens(The homeland of the Democracy!). Greece
    MS-Off Ver
    Excel 1997!&2003 & 2007&2010
    Posts
    13,744

    Re: Swap images depending on text in cell (vlookup for images??)

    Quote Originally Posted by Jakobshavn View Post
    Fotis1991:

    A very nice demonstration!
    .........................

  11. #11
    Valued Forum Contributor
    Join Date
    07-17-2005
    Location
    Abergavenny, Wales, UK
    MS-Off Ver
    XL2003, XL2007, XL2010, XL2013, XL2016
    Posts
    608

    Re: Swap images depending on text in cell (vlookup for images??)

    Hi

    Sorry about that. I hadn't noticed.
    try this version which seems to work fine.

    I have modified the code to test that the Shape being deleted is a Picture


    Please Login or Register  to view this content.
    Attached Files Attached Files

+ 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