View Single Post
  #5   Report Post  
Posted to microsoft.public.excel.programming
Bob Phillips[_6_] Bob Phillips[_6_] is offline
external usenet poster
 
Posts: 11,272
Default Counting Digits in a string

Put simply, my formula looks at each character in turn and multiplies it by
1. This will error if is not a number, so it easily extracts the numeric
values.

--

HTH

RP
(remove nothere from the email address if mailing direct)


"bw" wrote in message
...
Thank you both, Tom and Bob.
I wanted a spreadsheet solution, but I didn't know how to do it with code
either.
I don't understand the spreadsheet solution as provided by Bob, but it

does
work. I'll have to see if I can figure out what you have done here to

make
this work.

Thank you both again.
Bernie

"bw" wrote in message
...
I want to know how many digits (numbers) there are at the end of a

string,
so that I may move them elsewhere.
For example:
A1= "Consider This Example489".
This example has three digits.
Because I know A1 has 3 digits (after someone explains how to compute

it),
then B1=Right(A1,3)=489.

Thanks,
Bernie