Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Wanet Telecoms Ltd on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Count Function In Excel 1

Status
Not open for further replies.

serino64

Programmer
Feb 25, 2003
32
US
I need help with a count function. I would like a subtotal for column C. I need to count the number of dates in the format below. For example; column "C" would return a count of "2".

Column "C"
Rows
1
2 16-18 DEC
3 N/A
4 24-26 DEC

I tried using =Count(C1:C50) but the formula returns the value "0" .


Any help would be appreciated...
 
You could use something like

=COUNTIF(C1:C50,"<>N/A")

The example assumes that all cells without date contain "N/A".

TomCologne
 
TOM,

Thanks for your help. In addition to excluding N/A I also want to exclude NO. How would you include that in the function below.

=COUNTIF(C1:C50,"<>N/A")
 
The reason =Count(C1:C50) isn't working is because your cells are text, not dates/numbers! The count function tallies up all number-formatted cells. CountA returns the number of all populated cells (text and numbers).

If all of the cells that you want to count will have the same layout (dd-dd mmm), then you could use [COLOR=blue white]=COUNTIF(C:C,"*-*")[/color]
The asterisks act as wildcards, so the formula is just looking for a dash. If your data will not always be in this format, please provide more information about what you want.

Having said that, I would strongly suggest using actual dates. It will make your life much easier if you ever want to calculate anything based on the date ranges currently in column C.

Good luck.

[tt]-John[/tt]
________________________
To get the best answers fast, please read faq181-2886
 
John,

This is exactly what I was looking for. You were a great help! Thank you for your assistantce.


Chuck
 
Glad to help. [cheers]

[tt]-John[/tt]
________________________
To get the best answers fast, please read faq181-2886
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top