Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default Macro that counts cells with a specific value


Thanks a lot for the proposed solution, it works.

However, what I overlooked is the fact that some of the numbers in
column that should be counted have the text format. Any way to count
the cells in a column that have a value(although text) except the blank
cells?

Thanks very much!


--
VILLABILLA


------------------------------------------------------------------------
VILLABILLA's Profile: http://www.excelforum.com/member.php...fo&userid=2242
View this thread: http://www.excelforum.com/showthread...hreadid=491406

  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 11,123
Default Macro that counts cells with a specific value

Application.CountIf(Range("D:D"), "<0")
This will count all cells except the cells with 0

If you want to count all cells that are not blank use
MsgBox Application.CountA(Range("D:D"))

--
Regards Ron de Bruin
http://www.rondebruin.nl


"VILLABILLA" wrote in message
...

Thanks a lot for the proposed solution, it works.

However, what I overlooked is the fact that some of the numbers in
column that should be counted have the text format. Any way to count
the cells in a column that have a value(although text) except the blank
cells?

Thanks very much!


--
VILLABILLA


------------------------------------------------------------------------
VILLABILLA's Profile: http://www.excelforum.com/member.php...fo&userid=2242
View this thread: http://www.excelforum.com/showthread...hreadid=491406



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
average daily counts to weekly counts Dave Excel Discussion (Misc queries) 0 June 17th 08 06:24 PM
Email Macro specific Cells? neilcarden Excel Worksheet Functions 1 June 12th 07 07:31 PM
Macro to only change specific cells THT Excel Programming 1 May 2nd 05 05:21 PM
Run Macro from specific cells Piers 2k Excel Programming 3 April 4th 05 01:08 PM
Excel Counts Cells WZabrouski Excel Discussion (Misc queries) 3 March 17th 05 03:23 AM


All times are GMT +1. The time now is 08:33 PM.

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"