VLOOKUP based on 2 or 3 conditions....
MZ Tools makes life easier for the Excel VBA coder
Thanks Thanks:  0
Likes Likes:  0
Results 1 to 5 of 5

Thread: VLOOKUP based on 2 or 3 conditions....

  1. #1
    Board Regular
    Join Date
    Apr 2002
    Posts
    72
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Default

     
    I have the following lookup table:

    Col-1 Col-2 Col-3 Col-4
    1 159 0 1
    1 138 0 2
    1 305 0 3
    1 412 0 4
    2 119 1 0
    2 205 1 1
    2 333 1 2

    On another sheet i have a grid with the following:

    Cell A1 is reference.

    Col-2 Col-3 Col-4
    ? 0 1
    ? 0 2
    ? 1 1

    Suppose the reference (A1) had a value of 1. I want to be able to lookup 1 (ref value) and 0 (col-3 grid) and 1 (col-4 grid)in the Lookup Table (col-1) and match it across with col-3 and Col-4 (lookup table), returning a value of 159 (col-2 lookup table) to the grid (col-2). I hope that makes sense. Can someone point me to an example or direct me to the correct formulas to accomplish this.

    Thank you,

    Waxaholic

    [ This Message was edited by: Waxaholic on 2002-04-09 09:54 ]

  2. #2
    MrExcel MVP Russell Hauf's Avatar
    Join Date
    Feb 2002
    Location
    Portland, OR Area - USA
    Posts
    1,605
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Default

    On 2002-04-09 09:29, Waxaholic wrote:
    I have the following lookup table:

    Col-1 Col-2 Col-3
    1 159 1
    1 138 2
    1 305 3
    1 412 4
    2 119 0
    2 205 1
    2 333 2

    On another sheet i have a grid with the following:

    Cell A1 is reference.

    Col-2 Col-3
    ? 1
    ? 2
    ? 3

    Suppose the reference (A1) had a value of 1. I want to be able to lookup 1 (ref value) and 1 (col-3 grid) in the Lookup Table (col-1) and match it across with col-3 (lookup table), returning a value of 159 (col-2 lookup table) to the grid (col-2). I hope that makes sense. Can someone point me to an example or direct me to the correct formulas to accomplish this.

    Thank you,

    Waxaholic
    Try this (Sheet2 is your lookup sheet, with the data in cells A1:C7):

    =SUMPRODUCT((Sheet2!A1:A7=A1)*(Sheet2!C1:C7=C1)*(Sheet2!B1:B7))

    HTH,

    Russell

  3. #3
    Board Regular
    Join Date
    Apr 2002
    Posts
    72
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Default

    Sorry but i omitted a couple columns in the original post. I just finished editing it and seen that you had already posted a solution for the initial posting. Would the same apply having to refernece 3 values?

  4. #4
    Board Regular
    Join Date
    Feb 2002
    Location
    Calgary, Alberta Canada
    Posts
    3,329
    Post Thanks / Like
    Mentioned
    1 Post(s)
    Tagged
    0 Thread(s)

    Default


    When you tried extending the formula, what problem did you encounter?

  5. #5
    Board Regular
    Join Date
    Apr 2002
    Posts
    72
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Default

      
    Got it. Fantastic. Just had to sit back and think about it for a few minutes there. Thank you very much.

    Waxaholic

User Tag List

Like this thread? Share it with others

Like this thread? Share it with others

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  

 

 
DMCA.com