+ Reply to Thread
Results 1 to 9 of 9

Dependent Percentile Formula in Table with Nested Lookup or Index Match?

  1. #1
    Registered User
    Join Date
    11-04-2010
    Location
    Utah
    MS-Off Ver
    Excel 2003
    Posts
    4

    Dependent Percentile Formula in Table with Nested Lookup or Index Match?

    Wow, banging my head since 8:30 this morning on this one (still in pajamas!). Trying to do a dependent percentile formula from a table. The setup:

    1. SheetA contains two dependent drop-downs, DD1 and DD2. (no problems here)
    2. Based on selection in DD2, percentile formula calculates from corresponding table on SheetB
    3. Two criteria: 1)DD2 and 2) SheetB column header (ex. age)

    Spelled out, I select State (DD1) and dependent County (DD2) from dropdowns. Database on SheetB is then referenced according to selections, column AA is selected (hard-coded to correspond to age) and the 75th percentile is calculated based on values within now-defined column.

    Can't get very far - any suggestions?

    Thanks!

  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: Dependent Percentile Formula in Table with Nested Lookup or Index Match?

    Click GO ADVANCED and use the paperclip icon to post up a desensitized copy of your workbook.

    Manually mockup some desired results to help explain what you're trying to do visually.
    _________________
    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
    Forum Guru DonkeyOte's Avatar
    Join Date
    10-22-2008
    Location
    Northumberland, UK
    MS-Off Ver
    O365
    Posts
    21,531

    Re: Dependent Percentile Formula in Table with Nested Lookup or Index Match?

    By the sounds of it you want to use a subset of SheetB!AA based on DD2 value which is presumably stored in another (unspecified) column on SheetB ?

    If we assume the "State" data may not be stored in a contiguous manner on SheetB then an Array is probably your best bet:

    Please Login or Register  to view this content.
    where Col A holds State and AA the data points to be used in the Percentile.

  4. #4
    Registered User
    Join Date
    11-04-2010
    Location
    Utah
    MS-Off Ver
    Excel 2003
    Posts
    4

    Re: Dependent Percentile Formula in Table with Nested Lookup or Index Match?

    Ok! The percentile(if) is a great start, thanks...but not sure it will work here. The next step is to specify the array from the SheetB for the correct column.

    This is getting complex, so I've attached a working version. My comments on Sheet3 explain the entire situation in context. (So don't worry if you are reading this thread and aren't following yet). Feel free to edit. Only the first 3 sheets on the workbook are being used.

    Thank you in advance!
    Attached Files Attached Files

  5. #5
    Forum Guru DonkeyOte's Avatar
    Join Date
    10-22-2008
    Location
    Northumberland, UK
    MS-Off Ver
    O365
    Posts
    21,531

    Re: Dependent Percentile Formula in Table with Nested Lookup or Index Match?

    Your problems stem from the fact that

    a) "One Voice Industry" is not repeated per transaction

    b) Your Validation Options don't actually match the entries on Extract sheet
    (eg Engineering and Construction vs Engineering & Construction)

    c) per b) your "Benchmark" values don't match the headers on Extract sheet
    (eg if these columns can move it would be an idea to store these values in an adjacent col. so as to permit dynamic lookup)
    You can do what you want without too much difficulty should you address all of the above
    (you add a further IF and INDEX call to the Array)

  6. #6
    Forum Guru DonkeyOte's Avatar
    Join Date
    10-22-2008
    Location
    Northumberland, UK
    MS-Off Ver
    O365
    Posts
    21,531

    Re: Dependent Percentile Formula in Table with Nested Lookup or Index Match?

    Figured I should have elaborate with an example...

    Step 1: Change Engineering and Construction to Engineering & Construction ('SIC Table'!B10)

    Step 2: Add Key to Extract sheet
    Please Login or Register  to view this content.
    Step 3: Store Column References for Each Benchmark
    Please Login or Register  to view this content.
    Step 4: Apply the Result Array
    Please Login or Register  to view this content.
    Step 5: Going Forward
    correct all SIC Table references such that they match those used on the Extract Sheet

  7. #7
    Registered User
    Join Date
    11-04-2010
    Location
    Utah
    MS-Off Ver
    Excel 2003
    Posts
    4

    Re: Dependent Percentile Formula in Table with Nested Lookup or Index Match?

    Thanks, you are a life saver! And you made it so easy!

    One problem now: the Engineering & Construction sub-drop down isn't working (see attached). The sub data validation doesn't like the special "&" character. I could a find and replace - but is there a better, more dynamic way?

    While I'm at it, is there a way to replace this data validation drop downs with the more attractive combo boxes?

    Thank you again!
    Attached Files Attached Files

  8. #8
    Forum Guru DonkeyOte's Avatar
    Join Date
    10-22-2008
    Location
    Northumberland, UK
    MS-Off Ver
    O365
    Posts
    21,531

    Re: Dependent Percentile Formula in Table with Nested Lookup or Index Match?

    In terms of DV vs ComboBoxes... I'd stick with the former.

    In terms of getting the DV to work correctly... rather than lots and lots of defined names you could just do the following:

    Please Login or Register  to view this content.
    Now refine your 2nd DV Source on Sheet3 such that

    Please Login or Register  to view this content.
    I've not checked to see if you have B3:B24 etc named already - if so just use the existing name in the above formula

  9. #9
    Registered User
    Join Date
    11-04-2010
    Location
    Utah
    MS-Off Ver
    Excel 2003
    Posts
    4

    Re: Dependent Percentile Formula in Table with Nested Lookup or Index Match?

    DonkeyOte - you are great! I replaced all of the other-sheet references with named, and we're cranking! Thanks a million!

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

Tags for this Thread

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