Remove letters from a cell
If IsNumeric(Range("A1")) Then
myVar = Range("A1")
Else
myVar = Left(Trim(Range("A1")), Len(Trim(Range("A1"))) - 2)
End If
--
HTH
RP
"Steve" wrote in message
...
Ron
Is it possible to incorporate this into a macro ?
Thanks
Steve
-----Original Message-----
On Fri, 1 Oct 2004 04:37:11 -0700, "Steve"
wrote:
Column E of my spreadsheet contains a price. Appended
to
the price is a two letter country abbreviation.
E.g 3.50GB
or 2.67EU
I would like to remove any letters but leave the numbers.
One further point to note, trimming the column will not
work as some numbers do not have a country denomination.
=IF(ISNUMBER(--TRIM(A1)),--A1,--LEFT(TRIM(A1),LEN(TRIM
(A1))-2))
--ron
.
|