+ Reply to Thread
Results 1 to 5 of 5

Lookup name changes from a drop down?

  1. #1
    Registered User
    Join Date
    04-30-2009
    Location
    Gretna, Nebraska
    MS-Off Ver
    Microsoft 365 Apps for Business
    Posts
    46

    Lookup name changes from a drop down?

    I have named six different sets of data with six different names. I have a drop down box that lists these six different names. When I select one of the names from the drop down box, I would like the lookup I have off of this to change to what ever set of data the drop down selection is referring to. Example: I have my first data set named "Data_A", next "Data_B", etc... When my drop down selects "Data_E", i would like my Hlookup equation to change to HLookUp(a1,Data_E,3,false). Is this possible, or am I doing something wrong?
    Last edited by DButtgen; 05-22-2009 at 10:32 AM.

  2. #2
    Forum Expert JBeaucaire's Avatar
    Join Date
    03-21-2004
    Location
    Bakersfield, CA
    MS-Off Ver
    2010, 2016, Office 365
    Posts
    33,492

    Re: Lookup name changes from a drop down?

    That would requires an INDIRECT() reference to the cell you are making that selection in. If the lookup value is in A1 and the Data range choice (drop box) is in A2, the formula would be:

    =HLOOKUP(A1,INDIRECT(A2),3,FALSE)
    _________________
    Microsoft MVP 2010 - Excel
    Visit: Jerry Beaucaire's Excel Files & Macros

    If you've been given good help, use the icon below to give reputation feedback, it is appreciated.
    Always put your code between code tags. [CODE] your code here [/CODE]

    ?None of us is as good as all of us? - Ray Kroc
    ?Actually, I *am* a rocket scientist.? - JB (little ones count!)

  3. #3
    Registered User
    Join Date
    04-30-2009
    Location
    Gretna, Nebraska
    MS-Off Ver
    Microsoft 365 Apps for Business
    Posts
    46

    Re: Lookup name changes from a drop down?

    Thank you! Now, another question... If the metrics from the drop down change from a percentage on one, to a dollar on another, is there anyway to carry the formatting over?

  4. #4
    Forum Expert JBeaucaire's Avatar
    Join Date
    03-21-2004
    Location
    Bakersfield, CA
    MS-Off Ver
    2010, 2016, Office 365
    Posts
    33,492

    Re: Lookup name changes from a drop down?

    Formulas take on the formatting result of the cell they are in, which is usually a good thing. You're formulas are about to balloon a LOT if you want to build conditional formatting INTO the formula itself.

  5. #5
    Registered User
    Join Date
    05-15-2009
    Location
    Mesa, AZ
    MS-Off Ver
    Excel 2003
    Posts
    16

    Re: Lookup name changes from a drop down?

    If you only have 2 or three formatting options, you could conditionally format the cells based on what is in the dropdown (by using "Formula Is" in Conditional Formatting). The cells wouldn't really take on the formatting of the source cells, but you would format them identically based on what is selected. It would have the same effect.

+ 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