Results 1 to 4 of 4

VlookUp for Images in a table

Threaded View

  1. #1
    Registered User
    Join Date
    10-24-2018
    Location
    Milan, Italy
    MS-Off Ver
    2013
    Posts
    2

    VlookUp for Images in a table

    Hi everybody!

    I am just subscribed and I need some help with a Macro.

    I am trying to have something similar to a VlookUp but I would like to have images instead of a value as a result.

    Ex:
    In Sheet 1
    A1:A5 = Name of clothes (Sweater, Shirt, Jeans, Hat, Dress)
    B1:B5 = Images JPG of Clothes according to the name in A column.

    In Sheet 2
    A1:A5 = Name of clothes in a different order
    B1:B5 = I would like to have the images in Sheet 1 according to the name on A column


    I found a macro on other website, and it works in the sense that I can write each cloth on Sheet 2 A1 and it gives me the correct image in B1, but in doesn't give me all the other images in the other rows.

    The macro I used is the following:
    Sub ImmAle()
    '
    FoglioTab = "Sheet1"
    FoglioOut = "Sheet2"
    CellaPos = "F1"
    '
    '
    Look for the image...
    
    RigaNum = Range("F1").Value
    Sheets(FoglioTab).Activate
    CurPos = Range("B" & RigaNum).Address
    For Each Pict In ActiveSheet.Shapes
    If Pict.TopLeftCell.Address = CurPos Then
    NomeImm = Pict.Name: Exit For
    End If
    Next Pict
    
    ' …. and paste it on the Foglioout
    Sheets(FoglioOut).Activate
    If NomeImm = "" Then
    MsgBox ("Nessuna Immagine corrisponde")
    GoTo Uscita
    End If
    Sheets(FoglioTab).Shapes(NomeImm).Copy
    Range("B2" & RigaNum).Select
    ActiveSheet.Paste
    
    Exit:
    Application.EnableEvents = True
    End Sub
    In F1 I placed the following formula =MATCH(A1;Sheet1!A:A;0)
    How could I do? What's wrong with this Macro ?

    Thank you so much in advance!

    Giulia
    Last edited by GiuliLa; 10-24-2018 at 10:39 AM. Reason: Code tags added.

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. VLookup or Match Function to Return Images
    By rjj920 in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 12-28-2017, 11:52 PM
  2. Vlookup (but with images)
    By redJohn89 in forum Excel General
    Replies: 2
    Last Post: 07-13-2016, 02:47 AM
  3. [SOLVED] Changing images with userform and VLOOKUP? Not sure
    By Mr_Bill in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 09-30-2014, 02:31 AM
  4. Images in Table, with filter
    By excel.newbie.1 in forum Excel General
    Replies: 0
    Last Post: 09-12-2013, 04:48 AM
  5. Vlookup for Images
    By navneetvyas in forum Excel Formulas & Functions
    Replies: 1
    Last Post: 06-23-2013, 05:48 AM
  6. [SOLVED] Swap images depending on text in cell (vlookup for images??)
    By ld2x07 in forum Excel Formulas & Functions
    Replies: 10
    Last Post: 06-06-2013, 10:32 AM
  7. VLOOKUP for Images
    By HraHuuh in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 06-28-2012, 02:34 PM

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