+ Reply to Thread
Results 1 to 5 of 5

show and hide photos with formula

  1. #1
    Forum Contributor
    Join Date
    10-02-2014
    Location
    Philippines
    MS-Off Ver
    MAC MS office 2019
    Posts
    121

    show and hide photos with formula

    Hi Guys,

    Good day. I need your help to fix this code. The code is work. But the issue only when i add the formula in column (fruit name) the picture not display. Please can you help this the small issue. Because i need to add formula in fruit based on the SN. The main value is C2 because that the name of photos.

    Because some supplier send only the SN without the name of fruit. Then some supplier send item with barcode then I scanned the SN barcode from items. Then im using the vlookup from my database to find the name of fruit based on the SN.

    Screen Shot 2021-06-09 at 10.26.01 AM.JPG

    Here the code.

    Please Login or Register  to view this content.


    here the excel sample
    Attached Files Attached Files
    Last edited by jc83ph; 06-09-2021 at 06:06 AM.

  2. #2
    Forum Guru
    Join Date
    07-25-2011
    Location
    Florida
    MS-Off Ver
    Excel 2003
    Posts
    9,643

    Re: show and hide photos with formula

    The Worksheet_Change event does not trigger from a change in a formula. Only from a manual change. You manually change column D. The code should check if column D changes and then use the lookup value from the formulas in column C.

    Not tested...
    Please Login or Register  to view this content.
    Surround your VBA code with CODE tags e.g.;
    [CODE]your VBA code here[/CODE]
    The # button in the forum editor will apply CODE tags around your selected text.

  3. #3
    Forum Contributor
    Join Date
    10-02-2014
    Location
    Philippines
    MS-Off Ver
    MAC MS office 2019
    Posts
    121

    Re: show and hide photos with formula

    Thanks you for your response.

    Anyway, i understand that need manual change.

    my point is, there are many items arriving in my warehouse and I'm using scanner and excel with photos.

    now, when i scanned the barcode item with serial no. like 123, 212, 111, etc. then the name of fruit display in C2, based on the SN in database file.

    that why, i use the vlookup to find the name of fruit with SN to avoid manual enter. if i make copy and paste the fruit name in column C the photos display.

    My point only during I scanned the SN automatic display the photos based on the name of fruit.

  4. #4
    Forum Guru
    Join Date
    07-25-2011
    Location
    Florida
    MS-Off Ver
    Excel 2003
    Posts
    9,643

    Re: show and hide photos with formula

    You scan the SN in column D, correct? That is a manual change that would trigger the Worksheet_Change event. Then it can display the fruit picture from the Vlookup in column C.

  5. #5
    Forum Contributor
    Join Date
    10-02-2014
    Location
    Philippines
    MS-Off Ver
    MAC MS office 2019
    Posts
    121

    Re: show and hide photos with formula

    Hi thank you. is work. you're amazing.

    Thanks you for your help.

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. [SOLVED] Show / hide photos
    By jc83ph in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 08-09-2020, 09:06 PM
  2. Macro inserts photos but photos are lost when spreadsheet distributed
    By SamFojbk in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 08-12-2019, 02:51 AM
  3. [SOLVED] Hide/Show Zeros when using a formula
    By becky04 in forum Excel Formulas & Functions
    Replies: 5
    Last Post: 07-11-2016, 05:52 PM
  4. VBA Insert all Photos from folder - photos not lined up w/ cell borders in older versions
    By jaimelwilson in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 04-10-2014, 02:26 PM
  5. Hide/Show Formula
    By Battledeck in forum Excel General
    Replies: 1
    Last Post: 04-02-2012, 01:55 PM
  6. How do I hide a formula so it will not show on the spreadsheet?
    By Brenda in forum Excel Formulas & Functions
    Replies: 1
    Last Post: 04-05-2006, 09:20 AM
  7. how to show different photos, base on different value of a cell?
    By Howard Hsu in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 01-25-2006, 03:00 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