How to count the number of specific dates in a column containing formulas and blank text

chindog

New Member
Joined
Jan 26, 2010
Messages
4
Office Version
  1. 2010
Platform
  1. Windows
I am having a problem with constructing a formula to count the number of instances a particular date occurs. I'm using the sumproduct function, and getting the #VALUE! error.

In the example below, I want to count the number of instances the date 9/17/21 occurs in column B. It should be 3. Column A is text copied from another source. Column B converts that text to date format. Column C has my failed formula. Column D has a copy and paste special (value) of the entry for 9/17/21 in column B.

There are rows in the range that are populated with the formula result "". I want to ignore those in my sumproduct formula.

Any help would be appreciated!

test sumproduct.xlsx
ABCD
1Text dateDate ValueCount number
209/17/2021 arrive9/17/202144456
309/19/2021 arrive9/19/2021
4 
509/20/2021 arrive9/20/2021
609/17/2021 arrive9/17/2021
709/19/2021 arrive9/19/2021
809/17/2021 arrive9/17/2021
9 #VALUE!
Sheet1
Cell Formulas
RangeFormula
B2:B9B2=IF(A2="","",DATEVALUE(LEFT(A2,10)))
C9C9=SUMPRODUCT(--(DATEVALUE(B2:B9)=44456),(B2:B9<>""))
 

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.
I think countif will solve your problem like this::
Excel Formula:
=COUNTIF(B2:B9,DATEVALUE("09/17/2021"))
 
Upvote 0
Solution

Forum statistics

Threads
1,215,029
Messages
6,122,757
Members
449,094
Latest member
dsharae57

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