Hi,
Is it possible to remove the numbers from the end of string variable using a simple VB function?
I tried:
But it is clearly wrong, and even if it worked it would remove both 27's in the middle example below.
i.e I want strings:
"Number 23", "My 27 Isn't 27", "Test 44 5"
To be converted to:
"Number", "My 27 Isn't", "Test"
My full code is:
Code
lngLastC = .Range("C65536").End(xlUp).Row
Dim rn As Integer
rn = 1
ReDim strName(intNumRunners)
For Each rngRunners In .Range("C3:C" & lngLastC)
strName(rn) = rngRunners.Value
[B]strName(rn) = Replace(strName, IsNumber, "")[/B]
strName(rn) = RTrim(strName(rn))
rn = rn + 1
Next rngRunners
(where the bold line is where I need to trim the string)
If this isn't possible, could somebody please show me how I would loop backwards through a string removing any numbers until I reached a digit that wasn't a space or a number?
Thanks,
Dave