SUMPRODUCT discounting blank cells

anwaee2

Board Regular
Joined
Sep 13, 2012
Messages
151
Office Version
  1. 2011
Platform
  1. MacOS
I have this formula that works great except it also counts the blank cells too. I would like the

--(INDIRECT(R2)<=R4 part of the formula to only use the non blank cells in that range. I tried using NOT(ISBLANK(R2)) in several different ways with no results or errors. Also I tried using AND with <>"" with nothing but errors. I would appreciate any help I can get on this. Thanks in advance.



=SUMPRODUCT(--(MONTH($A$6:$A$371)=MONTH(R3&1)),--(INDIRECT(R2)<=R4))
 

Excel Facts

How to show all formulas in Excel?
Press Ctrl+` to show all formulas. Press it again to toggle back to numbers. The grave accent is often under the tilde on US keyboards.
Try
=SUMPRODUCT(--(MONTH($A$6:$A$371)=MONTH(R3&1)),--(INDIRECT(R2)<=R4)*(A:A<>""))
 
Upvote 0
Thanks to all. Using nemmi69, I used this formula and it worked great. Thank you so much.

=SUMPRODUCT(--(MONTH($A$6:$A$371)=MONTH(R3&1)),--(INDIRECT(R2)<=R4)*(INDIRECT(R2)<>""))
 
Upvote 0

Forum statistics

Threads
1,214,919
Messages
6,122,259
Members
449,075
Latest member
staticfluids

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