Counting Dates Entered VS Text In A Range


Posted by JIM BOISSONNAULT on October 25, 2001 8:30 AM

Is there simple non-VB way to check a range, say, A1:A100, for the number of dates entered and the number of text comments entered?



Posted by Aladin Akyurek on October 25, 2001 9:11 AM

Jim,

There is alas a built-in function ISDATE similar to ISTEXT. The CELL function cannot return an array of values. Given these limitations, you need to use an addtional column. That means entering in B1

=IF(LEFT(CELL("format",A1:A6))="D","D",IF(ISTEXT(A1),"T",""))

and copying this to B2:B100.

You can then apply

=COUNTIF(B1:B100,"D") to count dates and

=COUNTIF(B1:B100,"T") to count text entries.

Aladin