Consulting

Results 1 to 11 of 11

Thread: Solved: Lookup Help

  1. #1
    VBAX Regular xls's Avatar
    Joined
    Aug 2005
    Posts
    76
    Location

    Solved: Lookup Help

    Hi following is example of table in which data is available:

    I want data from table which specifies condition1 = a, condition 2 = 3 & Month=2. How to find out using formula.


    Cond. 1.....Cond. 2.......Month1..........Month2..........Month3
    ......a.............. 1..............Data1............ Data12.............Data13
    ......a.............. 2..............Data2............ Data12.............Data13
    ......a.............. 3..............Data3............ Data12.............Data13
    ......a.............. 4..............Data4............ Data12.............Data13
    ......a.............. 5..............Data5............ Data12.............Data13
    ......b.............. 1..............Data1............ Data12.............Data13
    ......b.............. 2..............Data2............ Data12.............Data13
    ......b.............. 3..............Data3............ Data12.............Data13
    ......b.............. 4..............Data4............ Data12.............Data13
    ......b.............. 5..............Data5............ Data12.............Data13

    Pl help
    Winners dont do different things, they do things differently.

  2. #2
    Knowledge Base Approver VBAX Wizard p45cal's Avatar
    Joined
    Oct 2005
    Location
    Surrey UK
    Posts
    5,876
    In B22 Array-Enter (Ctrl + Shft + Enter, not just Enter) the following formula:
    =INDEX($A$3:$E$14,MATCH(1,--($A$3:$A$14=$B$18)*($B$3:$B$14=$B$19),0),MATCH($B$20,$A$3:$E$3,0))
    ('orrible)
    It'll only find the first one.
    p45cal
    Everyone: If I've helped and you can't be bothered to acknowledge it, I can't be bothered to look at further posts from you.

  3. #3
    VBAX Regular xls's Avatar
    Joined
    Aug 2005
    Posts
    76
    Location
    Gr8, is there any other ay to find out without using array & sumproduct.

    Quote Originally Posted by p45cal
    In B22 Array-Enter (Ctrl + Shft + Enter, not just Enter) the following formula:
    =INDEX($A$3:$E$14,MATCH(1,--($A$3:$A$14=$B$18)*($B$3:$B$14=$B$19),0),MATCH($B$20,$A$3:$E$3,0))
    ('orrible)
    It'll only find the first one.
    Winners dont do different things, they do things differently.

  4. #4
    Knowledge Base Approver VBAX Wizard p45cal's Avatar
    Joined
    Oct 2005
    Location
    Surrey UK
    Posts
    5,876
    didn't use sumproduct..
    p45cal
    Everyone: If I've helped and you can't be bothered to acknowledge it, I can't be bothered to look at further posts from you.

  5. #5
    VBAX Regular xls's Avatar
    Joined
    Aug 2005
    Posts
    76
    Location
    Quote Originally Posted by p45cal
    didn't use sumproduct..
    Yes, i know. And thanks for posting answer.

    Anybody pl suggest me another way is possible. Or it reuiqres creating UDF.
    Winners dont do different things, they do things differently.

  6. #6
    Distinguished Lord of VBAX VBAX Grand Master Bob Phillips's Avatar
    Joined
    Apr 2005
    Posts
    25,453
    Location
    Are you expecting a list, or will there only be one? Why not an array formula?
    ____________________________________________
    Nihil simul inventum est et perfectum

    Abusus non tollit usum

    Last night I dreamed of a small consolation enjoyed only by the blind: Nobody knows the trouble I've not seen!
    James Thurber

  7. #7
    VBAX Regular xls's Avatar
    Joined
    Aug 2005
    Posts
    76
    Location
    Thanks for reply. Yes some place there is a list & at some place only one.

    I dont want array since is required using (ctr + shft + entr) after entering data. Many user dont know it & i dont want to use another control for prevating the same.
    Winners dont do different things, they do things differently.

  8. #8
    Distinguished Lord of VBAX VBAX Grand Master Bob Phillips's Avatar
    Joined
    Apr 2005
    Posts
    25,453
    Location
    I would not expect users to enter it, infact I would never expect users to enter formulae in my production worksheets. You should design it so that they only enter data, not code.
    ____________________________________________
    Nihil simul inventum est et perfectum

    Abusus non tollit usum

    Last night I dreamed of a small consolation enjoyed only by the blind: Nobody knows the trouble I've not seen!
    James Thurber

  9. #9
    VBAX Regular xls's Avatar
    Joined
    Aug 2005
    Posts
    76
    Location
    Dude i didnt mean that.

    Pl post solution i possible.
    Winners dont do different things, they do things differently.

  10. #10
    Knowledge Base Approver VBAX Wizard p45cal's Avatar
    Joined
    Oct 2005
    Location
    Surrey UK
    Posts
    5,876
    Quote Originally Posted by xls
    is there any other ay to find out without using array & sumproduct.
    Dude, perhaps you meant by the above:
    "is there any other way to find out without using array-entered formulae, but instead with SumProduct"

    ??

    If so (same sheet as before):
    =INDEX($C$3:$E$14,SUMPRODUCT(($A$3:$A$14=B18)*($B$3:$B$14=B19),ROW($A$3:$A$14)-ROW($A$3)+1),MATCH(B20,$C$3:$E$3,0))
    p45cal
    Everyone: If I've helped and you can't be bothered to acknowledge it, I can't be bothered to look at further posts from you.

  11. #11
    VBAX Regular xls's Avatar
    Joined
    Aug 2005
    Posts
    76
    Location
    Thanks dear it is working.

    can you explain sumproduct part. I did not understood second part where you are subtracting??
    Winners dont do different things, they do things differently.

Posting Permissions

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