• Match, Index, Vlookup Combinations

    Author
    Topic
    #464183

    I need to lookup data based on two separate criteria. I made a stab at it with the match and vlookup functions. With MATCH I can get the start of the lookup area but not the end.I sure there’s a much more elegant way than how I’ve approached this, so any help would be appreciated.

    Thanks

    Viewing 1 reply thread
    Author
    Replies
    • #1187281

      You could use the following formula in J5:

      =SUMPRODUCT(($A$2:$A$40=$I5)*($B$2:$B$40=$J$2)*$C$2:$C$40)

      and fill down. The formula for K5 would be

      =SUMPRODUCT(($A$2:$A$40=$I5)*($B$2:$B$40=$J$2)*$D$2:$D$40)

      If there is no match, the formula will return 0, so you should hide zeros.

    • #1187371

      Thanks! I came up with this also: =VLOOKUP($I5,INDIRECT(“a”&MATCH($J$2,$B$1:$B$40,0)&”:d”&MATCH($J$2,$B$1:$B$40,1)),COLUMN($C:$C))

      But your way is more flexible and easier to work with.

    Viewing 1 reply thread
    Reply To: Match, Index, Vlookup Combinations

    You can use BBCodes to format your content.
    Your account can't use all available BBCodes, they will be stripped before saving.

    Your information: