Reputation: 1
What is the best function to use if:
Sheet1:
CUSTOMER 2013
ABC 25
BBB 10
DDD 40
XYZ 20
YYY 30
ZZZ 15
Sheet2:
CUSTOMER 2010 2011 2012 2013
AAA 1 2 3
ABC 5 10 15
BBB 4 5 6
FFF 3 6 9
XYZ 4 6 8
ZZZ 2 4 6
Upvotes: 0
Views: 101
Reputation: 46451
Try using SUMIF
, e.g. if 2013 figures are in sheet called 2013 with Customers in column A and Sales in B then in summary sheet where customer is in A2 use this formula in 2013 column row 2 copied down
=SUMIF('2013'!A:A,A2,'2013'!B:B)
If the customer doesn't exist in 2013 sheet you get zero
The alternative is VLOOKUP
with IFERROR
, i.e.
=IFERROR(VLOOKUP(A2,'2013'!A:B,2,0),0)
See this example
Upvotes: 1