View Single Post
  #8   Report Post  
Posted to microsoft.public.excel.programming
Jim Cone Jim Cone is offline
external usenet poster
 
Posts: 3,290
Default Efficient way to drtermine if a string contains digits?


RBS,
Thanks for the info.
Even when "Like" is slower I still like Like. <g
Jim Cone


"RB Smissaert"

wrote in message
Yes, that is the fastest, but of course it doesn't give the position of the
first digit.
Did some timing, running on this string:
"aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa2aaabbbbbbbbbbb 3bbb"

Jim 4 msecs
RBS 24 msecs
Ron 5200 msecs

Of course the VBScript method will be a lot faster if the first 3 lines of
code are taken out of the function.
RBS