Help with Look Up Table Please?

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

I don't know if this is possible but here is my table:

Item Date Qty
xyz 7/3 452
xyz 7/4 225
zzy 7/2 120
abc 7/1 352

Can I do a lookup that will first search for Item, then date and return qty?
So if Item = xyz, and date = 7/4, then 452, else 0?

Any help is appreciated! TIA
 
Say your datalist is A2 to C5,
And you enter your search criteria in
D1 = item
D2 = date

Then try this:

=SUMPRODUCT((A2:A5=D1)*(B2:B5=D2)*C2:C5)
 
Enter as an array formula with Ctrl+Shift+Enter

E1 contains Item
E2 contains date

=IF(ISNA(INDEX($C$2:$C$5,MATCH(1,($A$2:$A$5=E1)*($B$2:$B$5=E2),0))),0,INDEX($C$2:$C$5,MATCH(1,($A$2:$A$5=E1)*($B$2:$B$5=E2),0)))

HTH
 
It worked. Thanks a bunch!

Toppers said:
Enter as an array formula with Ctrl+Shift+Enter

E1 contains Item
E2 contains date

=IF(ISNA(INDEX($C$2:$C$5,MATCH(1,($A$2:$A$5=E1)*($B$2:$B$5=E2),0))),0,INDEX($C$2:$C$5,MATCH(1,($A$2:$A$5=E1)*($B$2:$B$5=E2),0)))

HTH
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top