Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 386
Default Count numbers within text

I am trying to get a formula that will count the number of numbers within a
text string.

Example

320,J,KLY - i would like the function to return 3
,32,T,J,KLYU - I would like the function to return 2
1234,h,KlY - i am looking for 4

Anyone know if this is possible?

Thanks
  #2   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 15,768
Default Count numbers within text

Try this:

=SUMPRODUCT(LEN(A1)-LEN(SUBSTITUTE(A1,CHAR(ROW(INDIRECT("48:57"))),"") ))

--
Biff
Microsoft Excel MVP


"LiAD" wrote in message
...
I am trying to get a formula that will count the number of numbers within a
text string.

Example

320,J,KLY - i would like the function to return 3
,32,T,J,KLYU - I would like the function to return 2
1234,h,KlY - i am looking for 4

Anyone know if this is possible?

Thanks



  #3   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 386
Default Count numbers within text

outstanding, works a treat

thanks a million

"T. Valko" wrote:

Try this:

=SUMPRODUCT(LEN(A1)-LEN(SUBSTITUTE(A1,CHAR(ROW(INDIRECT("48:57"))),"") ))

--
Biff
Microsoft Excel MVP


"LiAD" wrote in message
...
I am trying to get a formula that will count the number of numbers within a
text string.

Example

320,J,KLY - i would like the function to return 3
,32,T,J,KLYU - I would like the function to return 2
1234,h,KlY - i am looking for 4

Anyone know if this is possible?

Thanks




  #4   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 3,718
Default Count numbers within text

=SUMPRODUCT(--ISNUMBER(--MID(A1,ROW(INDIRECT("1:"&LEN(A1))),1)))


"LiAD" wrote:

I am trying to get a formula that will count the number of numbers within a
text string.

Example

320,J,KLY - i would like the function to return 3
,32,T,J,KLYU - I would like the function to return 2
1234,h,KlY - i am looking for 4

Anyone know if this is possible?

Thanks

  #5   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 15,768
Default Count numbers within text

You're welcome. Thanks for the feedback!

--
Biff
Microsoft Excel MVP


"LiAD" wrote in message
...
outstanding, works a treat

thanks a million

"T. Valko" wrote:

Try this:

=SUMPRODUCT(LEN(A1)-LEN(SUBSTITUTE(A1,CHAR(ROW(INDIRECT("48:57"))),"") ))

--
Biff
Microsoft Excel MVP


"LiAD" wrote in message
...
I am trying to get a formula that will count the number of numbers
within a
text string.

Example

320,J,KLY - i would like the function to return 3
,32,T,J,KLYU - I would like the function to return 2
1234,h,KlY - i am looking for 4

Anyone know if this is possible?

Thanks








  #6   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 5,934
Default Count numbers within text

Here is a similar version without the volatile function...

=SUMPRODUCT(--ISNUMBER(--MID(A1,ROW($1:$999),1)))

It will work as long as the cell contains less than 1000 characters.

--
Rick (MVP - Excel)


"Teethless mama" wrote in message
...
=SUMPRODUCT(--ISNUMBER(--MID(A1,ROW(INDIRECT("1:"&LEN(A1))),1)))


"LiAD" wrote:

I am trying to get a formula that will count the number of numbers within
a
text string.

Example

320,J,KLY - i would like the function to return 3
,32,T,J,KLYU - I would like the function to return 2
1234,h,KlY - i am looking for 4

Anyone know if this is possible?

Thanks


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
count 2 criteria text or numbers BNT1 via OfficeKB.com Excel Worksheet Functions 3 November 20th 07 11:57 PM
Count, numbers and text Mel Excel Discussion (Misc queries) 8 June 13th 06 03:14 PM
How do i count numbers and letters to find a total count of all Linda Excel Worksheet Functions 4 November 10th 05 04:51 PM
Number count - postcodes and need to count the numbers of tim... Mark - Aust Excel Discussion (Misc queries) 1 October 24th 05 10:00 AM
count a group of numbers but do not count duplicates Lisaml Excel Worksheet Functions 2 January 26th 05 11:19 PM


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