Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 14
Default Format Text to number

I am using excel 2007 and I am creating a macro that will count the number of
account numbers in a column. The problem is that the account numbers are
stored as text not number. This prevents the count() function from working.
Is there a way to get this accomplished.

Thanks!
--
Bruce
  #2   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 834
Default Format Text to number

Use COUNTA, that counts a on-empty cell.

--

HTH

Bob

"Bruce D." wrote in message
...
I am using excel 2007 and I am creating a macro that will count the number
of
account numbers in a column. The problem is that the account numbers are
stored as text not number. This prevents the count() function from
working.
Is there a way to get this accomplished.

Thanks!
--
Bruce



  #3   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 1,069
Default Format Text to number

Try COUNTA instead of COUNT. COUNTA counts non-blank cells, not just numbers.
To use COUNTA in a macro you will have to refer to it like this:
Application.WorksheetFunction.CountA(etc.)
since it is a worksheet function, not a VBA function.

Hope this helps,

Hutch

"Bruce D." wrote:

I am using excel 2007 and I am creating a macro that will count the number of
account numbers in a column. The problem is that the account numbers are
stored as text not number. This prevents the count() function from working.
Is there a way to get this accomplished.

Thanks!
--
Bruce

  #4   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 14
Default Format Text to number

Yes, that works. Thanks!
--
Bruce


"Tom Hutchins" wrote:

Try COUNTA instead of COUNT. COUNTA counts non-blank cells, not just numbers.
To use COUNTA in a macro you will have to refer to it like this:
Application.WorksheetFunction.CountA(etc.)
since it is a worksheet function, not a VBA function.

Hope this helps,

Hutch

"Bruce D." wrote:

I am using excel 2007 and I am creating a macro that will count the number of
account numbers in a column. The problem is that the account numbers are
stored as text not number. This prevents the count() function from working.
Is there a way to get this accomplished.

Thanks!
--
Bruce

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
Convert numbers from text format to number format merlin68 Excel Discussion (Misc queries) 7 June 20th 07 07:03 PM
Change number (in text format) to numeric format Pam Excel Discussion (Misc queries) 5 October 24th 05 07:45 PM
How to change text format .126 to number format 0.126 ? vitality Excel Worksheet Functions 2 October 6th 05 01:02 PM
convert text-format number to number in excel 2000%3f Larry Excel Discussion (Misc queries) 1 July 29th 05 08:18 PM
How do i change numbers in text format to number format? Greg New Users to Excel 1 December 14th 04 05:22 PM


All times are GMT +1. The time now is 09:59 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"