View Single Post
  #4   Report Post  
Posted to microsoft.public.excel.programming
Bob Phillips[_6_] Bob Phillips[_6_] is offline
external usenet poster
 
Posts: 11,272
Default 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
.