Thread: Sum a vlookup
View Single Post
  #9   Report Post  
Posted to microsoft.public.excel.worksheet.functions
Harlan Grove Harlan Grove is offline
external usenet poster
 
Posts: 733
Default Sum a vlookup

Chad wrote...
Thanks for your answer. I ran into something else that I need your
help on though. It is using the same information but requires a sumproduct
formula. Let me show you.

a b c d e f
1 200701 200702 200703 200704
2 Promo1 .02 1 2 3 4
3 Promo2 .01 5 6 7 8
4 Promo3 .03 9 10 11 12
5 Promo1 .12 13 14 15 16
6 Promo1 .07 17 18 19 20
7
8 Promo1 200701 13.19

Again, I would like the user to define which Promo and Week. However,
instead of outputting a sum, I was wondering if it were possible to output
the weighted average of all of the Promo1's in Week 200701 (which is just the

....

=SUMPRODUCT(--(A2:A6=A8),B2:B6,INDEX(C2:F6,0,MATCH(B8,C1:F1)))
/SUMIF(A2:A6,A8,B2:B6)