# Help with a countif formula and a range of dates

#### STEVENS3010

##### Board Regular
Hi all,

Could somebody please help me with a formula. I have a range of data in column A (dates & times - e.g. 01/01/2021 9:00am)

I have a table of dates in a separate part of the sheet, and I'm looking for a formula to look up the value in the table e.g. "01/01/2021" in cell "S2" for example and to then count the number of times this date is in the range of data in column A. The issue is I only need to count the date part of the info in column A, not the time. Is it possible to use a countif formula with a partial match on time/date? i.e - can I only count the "01/01/201" part of the example in the first line?

### Excel Facts

Difference between two dates
Secret function! Use =DATEDIF(A2,B2,"Y")&" years"&=DATEDIF(A2,B2,"YM")&" months"&=DATEDIF(A2,B2,"MD")&" days"

#### Fluff

##### MrExcel MVP, Moderator
Excel Formula:
``=COUNTIFS(A:A,">="&S2,A:A,"<"&S2+1)``

#### STEVENS3010

##### Board Regular
You are a genius - thanks so much.

#### Fluff

##### MrExcel MVP, Moderator
You're welcome & thanks for the feedback.

Replies
0
Views
89
Replies
7
Views
437
Replies
2
Views
550
Replies
0
Views
495
Replies
4
Views
202

Excel contains over 450 functions, with more added every year. That’s a huge number, so where should you start? Right here with this bundle.

1,163,940
Messages
5,834,494
Members
430,289
Latest member
Tphil413

### 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.

### Which adblocker are you using?

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

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