Melvin Purvis wrote:
smartin wrote:
Hiya,
Take a look at this site that explains a nice way to match multiple
lookup criteria. Let us know if you get stuck!
http://xldynamic.com/source/xld.SUMPRODUCT.html
I've looked through the page that you linked to several times now.
I can't see how to apply sumproduct to this problem...
Ok no problem. I put your sample data in a worksheet:
Todays file
Name Date Qty Ticket#
Adam 12/1 45
Adam 12/7 12
Mike 1/1 34
Tom 1/12 4
Wally 11/5 56
yesterdays file
Name Date Qty Ticket#
Adam 12/1 45 4567
Adam 12/7 12 6787
Betty 12/5 67
Mike 1/1 34 5678
"Today's file" is in A1 (actual data begins in row 3).
"yesterday's file" is in A10 (actual data begins in row 12).
In D3:
=SUMPRODUCT(--(A3=$A$12:$A$15),--(B3=$B$12:$B$15),($D$12:$D$15))
Then fill down through D7.
Feel free to write back if you would like more explanation, but the site
I referenced does a great job of how and why this works.
By the way, this will only work as advertised if there is only one
ticket per person per day.
Hope this helps!