View Single Post
  #1   Report Post  
Posted to microsoft.public.excel.worksheet.functions
enna49 enna49 is offline
external usenet poster
 
Posts: 54
Default Is there a more efficient way to write this SUMPRODUCT

Hi
I have tried to change this to make it more readable, but evey time I do
this I get an error. Is there a more efficient way to write this. It is
very Messy

What it is. if col C = b3 and col D = c3 and col E = d3 then SUM Col O on
sheet ATB etc AND if col C = B3 and col D = E3 and Col E does NOT = A then
SUM Col O on sheet ATB AND if Col C = B3 and Col D = E3 and Col E is BLANK
then MINUS Col O on sheet ATB

=SUMPRODUCT(--('ATB DEC 2009'!$C$2:$C$5000=$B$3)*--('ATB DEC
2009'!$D$2:$D$5000=$C$3)*--('ATB DEC 2009'!$E$2:$E$5000=$D$3)*('ATB DEC
2009'!$O$2:$O$5000))
+SUMPRODUCT(--('ATB DEC 2009'!$C$2:$C$5000=$B$3)*--('ATB DEC
2009'!$D$2:$D$5000=$E$3),--('ATB DEC 2009'!$E$2:$E$5000<"A")*('ATB DEC
2009'!$O$2:$O$5000))
-SUMPRODUCT(--('ATB DEC 2009'!$C$2:$C$5000=$B$3)*--('ATB DEC
2009'!$D$2:$D$5000=$E$3)*--('ATB DEC 2009'!$E$2:$E$5000="")*('ATB DEC
2009'!$O$2:$O$5000))
Thank you