Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 7
Default Counting Nr of Entries in a Column which are Formatted as Date orText or Number

Dear Excel Community,
I have a column of 600 data entries. It is in cells B11 to B610. In the first few rows above the column I'd like to summarise the number of cells which are (a) date format - not too fussy which particular date format, just want to know that it is a date (b) number format (c) text format. I can get blank using =countblank(B11:B610) - with there was a CountDate() and CountNumber() formula - any help appreciated.

(I actually have tonse of columns - but answers to the above will assist. I've been working-around matters with AutoFilters - but a formula approach would be so helpful.

Thanks in advance, Gerry.
  #2   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 5
Default Counting Nr of Entries in a Column which are Formatted as Date or Text or Number

It may have no worksheet function to do this, but VBA have a function
"isdate".
Define a function:

Function CountDate(ra As Range)
Dim rCel As Range, i%
For Each rCel In ra
If IsDate(rCel) Then i = i + 1
Next
CountDate = i
End Function

ra is the range you want to count date.

дÈëÏûÏ¢
...
Dear Excel Community,
I have a column of 600 data entries. It is in cells B11 to B610. In the
first few rows above the column I'd like to summarise the number of cells
which are (a) date format - not too fussy which particular date format,
just want to know that it is a date (b) number format (c) text format. I
can get blank using =countblank(B11:B610) - with there was a CountDate()
and CountNumber() formula - any help appreciated.

(I actually have tonse of columns - but answers to the above will assist.
I've been working-around matters with AutoFilters - but a formula approach
would be so helpful.

Thanks in advance, Gerry.



  #3   Report Post  
Junior Member
 
Posts: 16
Default

It may have no worksheet function to do this, but VBA have a function
"isdate".
Define a function:

Function CountDate(ra As Range)
Dim rCel As Range, i%
For Each rCel In ra
If IsDate(rCel) Then i = i + 1
Next
CountDate = i
End Function

ra is the range you want to count date.
Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Counting the number of different entries in a column Wombat Excel Discussion (Misc queries) 2 January 29th 10 10:58 AM
Counting the number of entries in a column Wombat Excel Discussion (Misc queries) 7 January 20th 10 02:20 PM
Counting the number of date entries in a giving month Philgr Excel Discussion (Misc queries) 4 August 22nd 06 10:55 PM
Counting number of row entries BobD Excel Discussion (Misc queries) 1 June 21st 06 09:10 PM
counting number of entries for a date kevinhd Excel Programming 2 July 8th 05 10:49 AM


All times are GMT +1. The time now is 08:29 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"