View Single Post
  #1   Report Post  
Posted to microsoft.public.excel.programming
Jim Thomlinson Jim Thomlinson is offline
external usenet poster
 
Posts: 5,939
Default If column = value sum another column and place result in cell

Are you looking for numbers or text strings??? If you are looking for numbers
then...

=SUMPRODUCT(--('SOURCE DATA'!D2:D4000=133957), 'SOURCE DATA'!G2:G4000)+
SUMPRODUCT(--('SOURCE DATA'!D2:D4000=1462268), (--('SOURCE
DATA'!D2:D4000<=1462270), 'SOURCE DATA'!G2:G4000)

Don't worry about the or stuff. Just use 2 sumproducts...

--
HTH...

Jim Thomlinson


"S Himmelrich" wrote:

thank you for the suggestion, I've done as you mentioned:

=SUMPRODUCT(('SOURCE DATA'!D2:D4000=133957)+('SOURCE DATA'!
D2:D4000=146268),'SOURCE DATA'!G2:G4000)

however the result is zero, there are values 0 in the G2:G4000 range
to add