+ Reply to Thread
Results 1 to 9 of 9

How to select a different range depending on a drop down box

  1. #1
    Registered User
    Join Date
    10-31-2013
    Location
    Swindon
    MS-Off Ver
    Excel 2007
    Posts
    5

    Post How to select a different range depending on a drop down box

    Hello everyone,
    I'm new to the forum and would be grateful of some help.

    I have many tables with different values. Each table is allocated to a different person. I have managed to workout how to lookup using index and match function formula.
    What I'm trying to find out, is it possible to do a vlookup of the names to change the range of the index match?
    The filter is in D2, the answer in H2.
    I have searched through the forum but I've obviously not got my terminology correct to find what I want.

    Thanks
    Attached Files Attached Files
    Last edited by RaePatterson; 10-16-2014 at 05:59 PM.

  2. #2
    Forum Moderator
    Join Date
    01-21-2014
    Location
    St. Joseph, Illinois U.S.A.
    MS-Off Ver
    Office 365 V 2504
    Posts
    13,750

    Re: How to select a different range depending on a drop down box

    Quote Originally Posted by RaePatterson View Post
    Hello everyone,

    Each table is allocated to a different person. .......................
    What I'm trying to find out, is it possible to do a vlookup of the names to change the range of the index match?
    The filter is in D2, the answer in H2.

    Thanks
    1.) What answer do you want to come up in H2?
    2.) I am not seeing where the value "Peter" in D2 is part of the formula conditions.

  3. #3
    Forum Guru
    Join Date
    08-05-2004
    Location
    NJ
    MS-Off Ver
    365
    Posts
    13,582

    Re: How to select a different range depending on a drop down box

    You can use OFFSET to focus on each range assuming all tables have the same format

    =INDEX(OFFSET($A$2,MATCH(D2,$A$2:$A$50,0)-1,3,3,3),MATCH(E2,OFFSET($A$2, MATCH(D2,$A$2:$A$50,0)-1,1,3,1)),MATCH(F2, OFFSET($A$2, MATCH(D2, $A$2:$A$50,0)-3,3,1,3)))
    ChemistB
    My 2?

    substitute commas with semi-colons if your region settings requires
    Don't forget to mark threads as "Solved" (Edit First post>Advanced>Change Prefix)
    If I helped, Don't forget to add to my reputation (click on the little star at bottom of this post)

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

  4. #4
    Forum Guru
    Join Date
    08-05-2004
    Location
    NJ
    MS-Off Ver
    365
    Posts
    13,582

    Re: How to select a different range depending on a drop down box

    An easier way, since all your tables have the same scales for x and y coordinates...

    =INDEX(OFFSET(Data,MATCH(D2,$A$9:$A$50,0)-1,0),MATCH(E2,$B$9:$B$11),MATCH(F2,$D$7:$F$7))

    where Data is a defined name for D9:F11

  5. #5
    Registered User
    Join Date
    10-31-2013
    Location
    Swindon
    MS-Off Ver
    Excel 2007
    Posts
    5

    Re: How to select a different range depending on a drop down box

    Thanks for the replies


    I was looking to add something like "vlookup($D$2,$A$1:$A$25,4,false" to the rest of the formula in H2, to look up column A:A and offset to the start of the range required.
    Reading on the internet, I read that using the offset function uses far too many resources and wondered if there was a better way.

    I'm just about to try the offset method to see how it works out and will reply shortly.

    Thanks again

  6. #6
    Registered User
    Join Date
    10-31-2013
    Location
    Swindon
    MS-Off Ver
    Excel 2007
    Posts
    5

    Re: How to select a different range depending on a drop down box

    Hello ChemistB,

    I tried this method but couldn't get it to work.
    I'm new to using the offset method and must be doing something wrong.
    Would it be possible to apply it to my attached file so that I can see where I'm going wrong.

    Thanks

  7. #7
    Registered User
    Join Date
    10-31-2013
    Location
    Swindon
    MS-Off Ver
    Excel 2007
    Posts
    5

    Re: How to select a different range depending on a drop down box

    Quote Originally Posted by FlameRetired View Post
    1.) What answer do you want to come up in H2?
    2.) I am not seeing where the value "Peter" in D2 is part of the formula conditions.
    Thanks FlameRetired

    I was looking to add something like "vlookup($D$2,$A$1:$A$25,4,false" to the rest of the formula in H2, to look up column A:A and offset to the start of the range required.

  8. #8
    Forum Guru
    Join Date
    08-05-2004
    Location
    NJ
    MS-Off Ver
    365
    Posts
    13,582

    Re: How to select a different range depending on a drop down box

    Here you go. I changed your Blue spec to 5.53 since 0.53 doesn't even fall on your tables (your LCL being 4.0)
    Attached Files Attached Files

  9. #9
    Registered User
    Join Date
    10-31-2013
    Location
    Swindon
    MS-Off Ver
    Excel 2007
    Posts
    5

    Re: How to select a different range depending on a drop down box

    Thanks ChemistB, works a treat

+ 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] Formula to select a named range depending on value in one cell
    By Excelfail in forum Excel Formulas & Functions
    Replies: 8
    Last Post: 03-02-2014, 08:51 PM
  2. [SOLVED] Part 2 - a formula that says yes or no depending upon a range of drop down boxes
    By mfairhurst1 in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 10-14-2013, 09:36 AM
  3. select from a data range depending on a certain cell input.
    By Andism in forum Excel Formulas & Functions
    Replies: 10
    Last Post: 09-11-2012, 11:38 AM
  4. Automatically select data depending on what's chosen in a drop-down list
    By Cormentia in forum Excel Programming / VBA / Macros
    Replies: 7
    Last Post: 03-24-2011, 11:55 AM
  5. Select range depending on a column
    By Directlinq in forum Excel Programming / VBA / Macros
    Replies: 10
    Last Post: 03-04-2009, 06:54 AM

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