Is there a way to use countif to count any cells that have a date value in them?
Is there a way to use countif to count any cells that have a date value in them?
A date value equates to a number unless its in text format and will always be a whole number, the year of which will be greater than or equal to 1900
Try this array formula
=SUMPRODUCT(--(IFERROR(YEAR(A1:A15),0)>=1900),--(A1:A15<>""))
...confirmed by pressing CTRL+SHIFT+ENTER to activate the array, not just ENTER. You will know the array is active when you see curly braces { } appear around your formula. If you do not CTRL+SHIFT+ENTER you will get an error or a clearly incorrect answer. Press F2 on that cell and try again.
Last edited by Ace_XL; 09-30-2013 at 01:21 PM.
Life's a spreadsheet, Excel!
Say thanks, Click *
If you are asking if you can count the # of cells that have a date in them (such as a specific date) rather than simply counting any cell that has any date in it, yes to the former. I would say to the latter it might depend on the formatting and content.
Make contributors happy, click on the "* Add Reputation" as a way to say thank you.
Sam Capricci
Try
=COUNTIF(A1:A100,">0")
Technically, this is counting numeric values (dates are just numbers)
Don't think you can explicitly test for a date, just if it's a number or text..
There are currently 1 users browsing this thread. (0 members and 1 guests)
Bookmarks