Count cells with dates

  • Thread starter Thread starter Evgenia
  • Start date Start date
E

Evgenia

Hi,

Please help with the formulae, I need to COUNT cells that contain date
(dd/mm/yyyy).

Your help is appreciated.
 
Hi Barb,

That doesn't work in the UK. You should use date independent formulae such
as

=COUNTIF(A1:A15,DATE(2005,11,21))

or

=COUNTIF(A1:A15,--"2005-11-21")

--

HTH

RP
(remove nothere from the email address if mailing direct)
 
Thanks,
but i need to count cells that contain any date, not only a specific
one.
Can you help with that?
 
You need a UDF

Function CountDates(rng As Range)
Dim cell As Range
For Each cell In rng
If IsDate(cell.Value) Then
CountDates = CountDates + 1
End If
Next cell
End Function

=CountDates(A1:A15)

--

HTH

RP
(remove nothere from the email address if mailing direct)
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top