Count numbers within text

Closed
Useful - Feb 16, 2010 at 08:33 AM
rizvisa1 Posts 4478 Registration date Thursday January 28, 2010 Status Contributor Last seen May 5, 2022 - Feb 16, 2010 at 09:34 AM
Hello,
How to count numbers within text
Thanks!

3 responses

rizvisa1 Posts 4478 Registration date Thursday January 28, 2010 Status Contributor Last seen May 5, 2022 766
Feb 16, 2010 at 08:36 AM
what you mean count numbers with in text? Could you explain with example
I have many texts like that 5Fiesta75 and Iwant to count the how many number are there (within this text)
rizvisa1 Posts 4478 Registration date Thursday January 28, 2010 Status Contributor Last seen May 5, 2022 766
Feb 16, 2010 at 09:01 AM
You have to create a user defined function in VBA and use it to get the number of digits in a word
Thanks for you answer. I can solve this problem by another way bat I want to solve this problem using by formula
rizvisa1 Posts 4478 Registration date Thursday January 28, 2010 Status Contributor Last seen May 5, 2022 766
Feb 16, 2010 at 09:34 AM
Other idea that I can think of is that use SUBSTITUTE to remove all digits. The difference in length before and after sub, can give you that answer too

=LEN(B1) - LEN(SUBSTITUTE(SUBSTITUTE(SUBSTITUTE(SUBSTITUTE(SUBSTITUTE(SUBSTITUTE(SUBSTITUTE(SUBSTITUTE(SUBSTITUTE(SUBSTITUTE(B1,1,""),2,""),3,""),4,""),5,""),6,""),7,""),8,""),9,""),0,""))