Link to home
Create AccountLog in
Avatar of htamraz1
htamraz1Flag for United States of America

asked on

counting date values in Excel

Hello,

I'm looking for a formula like COUNTIF (or similar) in Excel 2010 to count the number of date values in a particular row. See screen shot attached to give you an idea of what I am looking to do. I am guessing this requires testing to see if the content of a particular cell is date in order to count it as date.

Thoughts!

Thank you.
SampleScreen.pdf
Avatar of Richard Daneke
Richard Daneke
Flag of United States of America image

Using an embedded if statement, you can count the dates.
Sample file attached.

It is not sophisticated, but a date is a number.  So a test on the date cell can count as 1.
Hence:
=IF(ISNUMBER(B8),1,0)+IF(ISNUMBER(E8),1,0)+IF(ISNUMBER(H8),1,0)

Open in new window

Counts the dates in the three cells when otherwise the cell is blank or text.

The challenge on a CountIf is creating the noncontiguous range and in defining the criteria.  Hopefully, you do not have too many date columns to count.
EECountDates.xlsx
ASKER CERTIFIED SOLUTION
Avatar of Subodh Tiwari (Neeraj)
Subodh Tiwari (Neeraj)
Flag of India image

Link to home
membership
Create an account to see this answer
Signing up is free. No credit card required.
Create Account
Avatar of htamraz1

ASKER

Excellent! This did it.
Thank you
You're welcome. Glad I could help. :)