Thread: Sumif
View Single Post
  #3   Report Post  
Posted to microsoft.public.excel.worksheet.functions
pdberger pdberger is offline
external usenet poster
 
Posts: 258
Default Sumif

Mirko -- Here's a place where the =SUMPRODUCT function works slick. As
follows:

1 2
A Fred 1
B Joe 2
C Fred 3
D Joe 4
E Sam 5
F
G Fred =SUMPRODUCT(--($A$1:$A$5=G1),$B$1:$B$5
H Joe copy down

How it works -- if the value in the 'A' column equals the test value (in
this case, Fred) it assigns a value of '1' and multiplies it by the value in
the second column, and summing the results. You can do this (carefully!)
with multiple criteria.

HTH.

"Mirko" wrote:

Hello,

I want to have my sum if check two variables before it outputs the result.

So I need to check

1. Col A7 in book 1 to Col A2:A400 in book 2, and
2. Col E7 in book 1 to Col B2:B400 in book 2, then
3. Output my quanitity or Col G2:G400 in book 2 in book 1 where I am running
the formula.

Any help greatly appreciated

The reason for the sumif is that there might be multiple entries of the same
name and I want a combined value instead of a each single entry.

Thank you