Use of Like to extract data
- From: rve_52@xxxxxxxxxxx
- Date: 11 Mar 2007 05:51:40 -0700
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.
.
- Follow-Ups:
- Re: Use of Like to extract data
- From: Ron Rosenfeld
- Re: Use of Like to extract data
- Prev by Date: Application.run is not working
- Next by Date: Using Excel template from VBA - Virus scanner problem.
- Previous by thread: Application.run is not working
- Next by thread: Re: Use of Like to extract data
- Index(es):
Relevant Pages
|
Loading