Countifs now working with date format

agamino

New Member
Joined
May 6, 2015
Messages
29
I have the current date format and cannot get a count between two dates. Here is my formula:

=COUNTIFS(N2:N11253,">=01-Apr-15 00:00:00",N2:N11253,"<=30-Apr-15 00:00:00")

any help is appreciated.
 

Excel Facts

Will the fill handle fill 1, 2, 3?
Yes! Type 1 in a cell. Hold down Ctrl while you drag the fill handle.
Welcome to the Board!

Try this:
Code:
[COLOR=#333333]=COUNTIFS(N2:N11253,">=" & DATE(2015,4,1),N2:N11253,"<=" & DATE(2015,4,30))[/COLOR]
 
Upvote 0
Welcome, i don't know if you can put the date/time value directly in to the formula, i think you have to change it a little bit:

=COUNTIFS(N2:N11253,">="&date(2015,4,1),N2:N11253,"<="&date(2015,4,30))
 
Upvote 0
I have the current date format and cannot get a count between two dates. Here is my formula:
What exactly happens with your formula?
Do you get 0, or some other number that is just not the correct #?

Are the dates in N2:N11253 real dates?
Confirm with
=ISNUMBER(N2) and fill down
Are they TRUE or FALSE? Or mix of both?
 
Upvote 0
Welcome, i don't know if you can put the date/time value directly in to the formula
You can, as long as it's written in a format consistent with your PC's regional settings for date formats.

So if you wrote it as ">=4/7/2015" and your intention is that represents July 4th, but your PC is using US formats of mm/dd/yyyy
Then it would be read as April 7th.

That's why it is best to avoid that ambiguity by using the DATE function as suggested..
 
Upvote 0
I tried this formula:

=COUNTIFS(N2:N11253,">=" & DATE(2015, 4, 1),N2:N11253,"<=" & DATE(2015,4,30))

I still get "0" and it should return 170. I made sure the cells are in date format and not text or number. Not sure why it will not read.
 
Upvote 0
I made sure the cells are in date format and not text or number.
It does't matter how the cells are 'formatted'.
It only matters if the cells actually 'contain' real dates.
i.e. A cell can be formatted as a Date, yet still contain a text string (and vice versa)

What did the =ISNUMBER(N2) return?
 
Upvote 0
Are you sure you have dates that fall within that range?
Go to a date that falls in the range you are searching, temporarily change its Format to "General", and let us know what it returns.
 
Upvote 0
Ok that's why it doesn't work in my sheets when i use date/time values that some folks post here.....
 
Upvote 0

Forum statistics

Threads
1,214,650
Messages
6,120,736
Members
448,988
Latest member
BB_Unlv

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