Use of Like to extract data



I have to process a large number of cells looking for various strings
consisting of numbers followed by a decimal. The strings can consist
of 1, 2 or 3 digits then the decimal. I need to extract the string
if

I find it. I have tried this approach looking for a single digit and
a decimal.

strCall = ActiveCell.Value2
For iCnt = 1 To Len(strCall)
If (Mid(strCall, iCnt, 1) Like "*[0-9,.]*") Then
MsgBox iCnt
MsgBox Mid(strCall, iCnt, 2)
Exit For
End If
Next iCnt

Is there a better/faster way that I can do it without looping through
the string containing the data character by character?

Thanks for your help.

.



Relevant Pages

  • Re: Why asci-only symbols?
    ... Currently, the identifier must be encoded in latin1 in this source code, and it must only consist of letters, digits, ... The value of name will be a string consisting of the bytes ... but why shouldn't the default assumption for literal-generated strings be what the coding ... encoding specified in the source encoding, ...
    (comp.lang.python)
  • Removing strings from a file
    ... I'm trying to read in files generated by another applications ... consisting of columns of strings using the textread function. ...
    (comp.soft-sys.matlab)
  • Re: Set and casting
    ... Or an set of all primes, or of all strings containing an 'a'... ... Consider that now we have arbitrary super-sets, consisting of e.g. all ordinal ...
    (comp.lang.pascal.delphi.misc)
  • Re: Huge string arrays in C#
    ... If you just want to build a large string (consisting of 100k of strings) and ... write it in one chunk to a file you don't have to do anything but use ... Just append the strings to it until it ... >> What would be the most effcient way to use a huge in-memory string array? ...
    (microsoft.public.dotnet.framework.performance)

Loading