SumProduct Formula sum ="" or <1/1/2000

drom

Well-known Member
Joined
Mar 20, 2005
Messages
528
Office Version
  1. 2021
  2. 2019
  3. 2016
  4. 2013
  5. 2011
  6. 2010
  7. 2007
Hi and Thanks in advance!
I have a Table with Dates in a Column (for tis Eg: A5:A500
  • A4= DATE

If any of this cells is Empty or the inserted Date is <1/1/2000

Since 1/1/2000 is = 36526

I can Apply conditional formatting using:
  • =AND(A5<>"";A5<36526)
But Now if I wanna count how many of this cells are empty or the date on them is < 1/1/2000
I was tryng to use in A2

A2 = =SUMAPRODUCTO(--((A5:A500<36526)+(A5:A500="")))
I know 3 cells are empty and only1 shows a date prior 1/1/2000 but the above formula is giving me 7

ps: I do not want to use:
=SUMAPRODUCTO(--(A5:A500=""))+SUMAPRODUCTO(--(A5:A500<36526);--(A5:A500<>""))
I am trying to learn how to apply Or Conditional fomatting for this eg
 

Excel Facts

How to total the visible cells?
From the first blank cell below a filtered data set, press Alt+=. Instead of SUM, you will get SUBTOTAL(9,)
Try this:

=SUMAPRODUCTO(--(A5:A500<36526))
This is gonna work only for empty cells
I am trying to sum the cells < 36526, I mean the cells < 1/1/2000 as well as the empty ones
But no duplicating the result.
=SUMPRODUCT(--(A5:A500=""))+SUMPRODUCT(--(A5:A500<36526);--(A5:A500<>"")) WORKS
But I am truing to use the OR inside the SumProduct for both case:
= ""
< 36526
 
Upvote 0
You get 7 as the blank cells are counted twice, one way is
Excel Formula:
=SUMPRODUCT(SIGN((A5:A500<36526)+(A5:A500="")))
 
Upvote 0
Solution
Another way:

=SUMPRODUCT((A5:A500<36526)*(A5:A500>0)+(A5:A500=""))
 
Upvote 0

Forum statistics

Threads
1,215,181
Messages
6,123,508
Members
449,101
Latest member
mgro123

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