I have data in column **A**. Some of the values are dates and some are not:

```
Cat
1234
12/25/2016
$123.45
6/10/2016
```

I want to count the number of cells in the column that contain dates of a specific format. I am interested in counting cells for which the *CELL()* worksheet function returns *"D4"*.

I can do this with a helper column; in **B1** I enter:

```
=CELL("format",A1)
```

and then copy down. Then in another cell:

```
=COUNTIF(B:B,"D4")
```

I can also do this with a VBA UDF:

```
Public Function DateCounter(rng As Range) As Long
Dim r As Range
For Each r In rng
If IsDate(r) Then DateCounter = DateCounter + 1
Next r
End Function
```

I would like to do this without VBA and without a "helper" column.

What I have tried is:

```
=SUMPRODUCT(--(CELL("format",A1:A5)="D4"))
```

But this always returns **0** *(either as a normal formula or an array formula)*

SUMPRODUCT()fails ?? – Gary's Student Jun 10 '16 at 14:32