View Single Post
  #13   Report Post  
Posted to microsoft.public.excel.worksheet.functions
Rbirdie Rbirdie is offline
external usenet poster
 
Posts: 11
Default SUMPRODUCT Returning 0 or wrong totals

Column M is actually blank. But, you bring up a good point.

I believe that Column A in some cases has a space after the data.
If I can use the trim on column A then it might solve the issue.

=SUMPRODUCT(--(TRIM(Detail!$A3:$A12441)
="C"),--(Detail!$M3:$M12441<""),(Detail!L3:L12441))

THIS WORKS!!!!!!!!!!!!!!!!!!

It eliminates that extra space when it is there.


'=SUMPRODUCT(--(trim(Detail!$A2:$A12440 ="C"),--(Detail!$M2:$M12440=""),(Detail!L2:L12440))


"pmartglass" wrote:

is it possible that your column M is not actually blank
maybe you should try to trim the cell then check for ""

'=SUMPRODUCT(--(Detail!$A2:$A12440 ="C"),--(trim(Detail!$M2:$M12440)
=""),(Detail!L2:L12440))



"Rbirdie" wrote:

I have been trying to figure this out for 3 days.
I have 2 criterias that need to be met and then I want the total of a column.
I am trying to get a total of each region with notes and without notes.


Col A is region
Col M are notes on accts
Col L are dollars

A M L

1. C Notes in field 3.15
2. W Blank 100.50
3. NE Notes in field 600.00

Here is my formula:
=SUMPRODUCT((Detail!$A2:$A12440 ="^C"),(Detail!$M2:$M12440
=""),(Detail!L2:L12440))

It is returning 0. If I play with the formula and change the , to -- then it
does return a value, but one that is not correct.
I also tried filling in the BLANKS of column M with a word and that did not
help.
Please any help is appreciated.