+ Reply to Thread
Results 1 to 7 of 7

Multiple condition vlookup & matching

  1. #1
    Forum Contributor
    Join Date
    02-27-2009
    Location
    Chennai, India
    MS-Off Ver
    Excel 2013
    Posts
    327

    Multiple condition vlookup & matching

    Static Data

    A1:A12 - name range - "XYZ"
    Columns B to G (B1:G12) - has numbers (without decimal)

    (B & C column cells contain some data for 1 to 10 days
    D & E - column cells contain some data for 11 to 21 days
    F & G - column cells contain some data for 22 to 32 days


    Input & Result

    H1 - a dropdown list referring to "XYZ" name range
    I1 - Input data 2 digits max (cell is formatted as number & max value is 1 to 32)
    J1 - Result1
    K1 - Result2


    My Question is

    In H1 some value is selected from dropdown, then in I1 a number (1-32) is entered.

    For instance, the selection is A1 & the number is 1
    J1 should show b1 & K1 should show C1.

    If the entered number is 12, then J1 should show D1, & K1 should show E1

    Hope my question is clear.
    Last edited by jilaba; 03-03-2009 at 01:10 PM. Reason: Solved

  2. #2
    Forum Expert NBVC's Avatar
    Join Date
    12-06-2006
    Location
    Mississauga, CANADA
    MS-Off Ver
    2003:2010
    Posts
    34,898

    Re: Multiple condition vlookup & matching

    Better if you attach a sample workbook showing what you need.
    Where there is a will there are many ways.

    If you are happy with the results, please add to the contributor's reputation by clicking the reputation icon (star icon) below left corner

    Please also mark the thread as Solved once it is solved. Check the FAQ's to see how.

  3. #3
    Forum Contributor
    Join Date
    02-27-2009
    Location
    Chennai, India
    MS-Off Ver
    Excel 2013
    Posts
    327

    Re: Multiple condition vlookup & matching

    Thanks, I attached a file Text.xls.

    But this is not a sample, i am doing this as new.
    Attached Files Attached Files
    Last edited by jilaba; 03-03-2009 at 11:42 AM. Reason: Change in reply

  4. #4
    Forum Expert NBVC's Avatar
    Join Date
    12-06-2006
    Location
    Mississauga, CANADA
    MS-Off Ver
    2003:2010
    Posts
    34,898

    Re: Multiple condition vlookup & matching

    See attached...

    If I understood you correctly, formula in J1 would be:

    =INDEX($A$1:$G$12,MATCH(H1,XYZ,0),$I$1)

    and formula in K1 would be:

    =INDEX($A$1:$G$12,MATCH(H1,XYZ,0),$I$1+1)

    these will extract the numbers in the row that the input in H1 is found in and at the column number indicated by I1 and the column next to that...

    Also, I added a data validation to I1 that would force users to enter an even number only... as I think this makes sense.. you don't want them to enter 1, 3, 5, 7, etc in I1, do you? To see the validation test, select I1 and go to Data|Validation.
    Attached Files Attached Files

  5. #5
    Forum Contributor
    Join Date
    02-27-2009
    Location
    Chennai, India
    MS-Off Ver
    Excel 2013
    Posts
    327

    Re: Multiple condition vlookup & matching

    Sorry, did not work. I explained it in the attachment. Have a look @ it please.

    Thanks.

    Quote Originally Posted by NBVC View Post
    See attached...

    If I understood you correctly, formula in J1 would be:

    =INDEX($A$1:$G$12,MATCH(H1,XYZ,0),$I$1)

    and formula in K1 would be:

    =INDEX($A$1:$G$12,MATCH(H1,XYZ,0),$I$1+1)

    these will extract the numbers in the row that the input in H1 is found in and at the column number indicated by I1 and the column next to that...

    Also, I added a data validation to I1 that would force users to enter an even number only... as I think this makes sense.. you don't want them to enter 1, 3, 5, 7, etc in I1, do you? To see the validation test, select I1 and go to Data|Validation.
    Attached Files Attached Files

  6. #6
    Forum Expert NBVC's Avatar
    Join Date
    12-06-2006
    Location
    Mississauga, CANADA
    MS-Off Ver
    2003:2010
    Posts
    34,898

    Re: Multiple condition vlookup & matching

    Try these in J1 and K1, respectively:

    =INDEX($A$1:$G$12,MATCH($H$1,XYZ,0),LOOKUP($I$1,{1,11,21},{2,4,6}))

    =INDEX($A$1:$G$12,MATCH($H$1,XYZ,0),LOOKUP($I$1,{1,11,21},{3,5,7}))
    Last edited by NBVC; 03-03-2009 at 01:03 PM. Reason: Better formulas...

  7. #7
    Forum Contributor
    Join Date
    02-27-2009
    Location
    Chennai, India
    MS-Off Ver
    Excel 2013
    Posts
    327

    Re: Multiple condition vlookup & matching

    It works great. Thanks a lot.

    [QUOTE=NBVC;2052144]Try these in J1 and K1, respectively:.........

+ 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