# Countif

#### lyle

##### New Member
Hi All,

I am trying to count a column in excel, range of A2:A200 and need to count the number of cells that contain dates and not free text.

Can only think of COUNTIF, but having major problems with this.

Any help would be great.

Lyle

### Excel Facts

Waterfall charts in Excel?
Office 365 customers have access to Waterfall charts since late 2016. They were added to Excel 2019.

#### jim may

##### Well-known Member
Dates in Excel can be numbers. To count the Numbers (if all are dates) use
= Count(A2:A200); Write back if I misunderstood...

#### James01

##### Board Regular
The formula will depend on the format of the date. For example if from A2:A200 date is formatted as "dd/mm/yy" then the formula to use is

Code:
``+COUNTIF(A2:A200,TEXT(A2:A200,"dd/mm/yy"))``

#### jim may

##### Well-known Member
In a empty column, row 2 enter: =IF(CELL("format",A2)="D4",1,0) .. will produce either
1 for Dates or 0 for numbers -- Sum the Column

#### lyle

##### New Member
Thanks all, so far all of these formulas have worked.

#### jim may

##### Well-known Member
If "D4" doesn't work for you try "D1".
Bed time, here... Good luck..

Replies
4
Views
298
Replies
1
Views
339
Replies
5
Views
282
Replies
3
Views
321
Replies
1
Views
116

1,190,827
Messages
5,983,113
Members
439,824
Latest member
nellyc

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