+ Reply to Thread
Results 1 to 5 of 5

Display a Object from Non Value List

  1. #1
    Forum Contributor
    Join Date
    03-05-2009
    Location
    usa
    MS-Off Ver
    Excel 2016 32Bit
    Posts
    1,173

    Display a Object from Non Value List

    This is hard to explain and not sure if there is a possible work around for this. In my example you will see my name list that changes
    with a array to data validation. Seems like you can find ways around things most of the time but this time I need some expert help.
    Attached Files Attached Files
    Last edited by zplugger; 12-05-2012 at 04:47 PM.

  2. #2
    Forum Expert tigeravatar's Avatar
    Join Date
    03-25-2011
    Location
    Colorado, USA
    MS-Off Ver
    Excel 2003 - 2013
    Posts
    5,361

    Re: Display a Object from Non Value List

    zplugger,

    Attached is a modified version of your example workbook.
    I created a macro in a standard module named "DisplayFace"
    Please Login or Register  to view this content.


    I then used the workbook_open event and sheet 'TablePlan' worksheet_change event to call that macro.
    In the ThisWorkbook code module:
    Please Login or Register  to view this content.


    In the Sheet1 (TablePlan) code module:
    Please Login or Register  to view this content.


    It should also be noted that I changed how the 'Lists' sheet works. First I got rid of the named range "NameCheck". I made row 1 a header row with actual data starting in row 2. In column A is the full list of names. I created a dynamic named range to reference that full list named "list_Names" and defined it with this formula:
    Please Login or Register  to view this content.

    Then in column B I used a formula to get the list of unused names. In cell B2 and copied down to B25 is this formula:
    Please Login or Register  to view this content.

    Next I created a dynamic named range to reference that list of unused names named "list_UnusedNames" and defined it with this formula:
    Please Login or Register  to view this content.


    You'll see that the sub DisplayFace uses the dynamic named range "list_UnusedNames" to determine when there are no longer any names left unused, which is how the smiley face and frowny face swap visibility. To test it out, just use up all the names (I think I saved it with only 1 name left to use) and you'll see the faces switch. To switch back, delete any name in the guest list (column D on sheet 'TablePlan').
    Attached Files Attached Files
    Hope that helps,
    ~tigeravatar

    Forum Rules: How to use code tags, mark a thread solved, and keep yourself out of trouble

  3. #3
    Forum Contributor
    Join Date
    03-05-2009
    Location
    usa
    MS-Off Ver
    Excel 2016 32Bit
    Posts
    1,173

    Re: Display a Object from Non Value List

    I just can't believe what you have done,you are a amazing person. I can't thank you enough for all
    the help you give people on this forum. Now it time for me to get to work, need tables for 150 people.

    Thanks Z

  4. #4
    Forum Expert tigeravatar's Avatar
    Join Date
    03-25-2011
    Location
    Colorado, USA
    MS-Off Ver
    Excel 2003 - 2013
    Posts
    5,361

    Re: Display a Object from Non Value List

    You're very welcome

  5. #5
    Forum Guru
    Join Date
    03-02-2006
    Location
    Los Angeles, Ca
    MS-Off Ver
    WinXP/MSO2007;Win10/MSO2016
    Posts
    12,613

    Re: Display a Object from Non Value List

    in the Tables sheet module:
    Please Login or Register  to view this content.
    Worksheet event code is stored on a worksheet module. To add it to your worksheet, do the following:

    Copy the code
    Select the worksheet in which you the code to run
    Right click on the sheet tab and choose View Code, to open the Visual Basic Editor.
    Where the cursor is flashing, choose Edit | Paste
    Ben Van Johnson

+ 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