Distinguish Empty cells from '0' value in Sumproduct Boolean?

Safari Breeze

New Member
Joined
Aug 5, 2011
Messages
7
Hi, <?xml:namespace prefix = o ns = "urn:schemas-microsoft-com:office:office" /><o:p></o:p>
I’m trying to distinguish empty cells from ‘0’ values in the (--) boolean 1/0 part of my Sumproduct formula. Actually, I want ‘0’ to be considered a value.
<o:p></o:p>
My formula:<o:p></o:p>
IF(A1="X",SUMPRODUCT(Range1,Range2)/SUMPRODUCT(--((Range1)>0),Range2)
<o:p></o:p>
I tried:<o:p></o:p>
…./SUMPRODUCT(--((Range1)>=0),Range2)
But instances of ‘0’ were not counted in the Boolean i.e. FALSE, so results were the same as if cell was empty. (Strange?)<o:p></o:p>

Could I use a ISNUMBER function here instead?<o:p></o:p>

Or what about coercing the cell to default to 0.01 if a value of 0 is entered? That would be Boolean TRUE.<o:p></o:p>

Thanks <o:p></o:p>
 

Excel Facts

Move date out one month or year
Use =EDATE(A2,1) for one month later. Use EDATE(A2,12) for one year later.
Try using a SUMIF function instead.

IF(A1="X",SUMPRODUCT(Range1,Range2)/SUMIF(Range1,">=0",Range2)
 
Upvote 0

Forum statistics

Threads
1,224,506
Messages
6,179,159
Members
452,892
Latest member
yadavagiri

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top