View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
Norman Jones Norman Jones is offline
external usenet poster
 
Posts: 5,302
Default Trimming text contained in cells

Hi Todd,

Try:

Sub Tester()

Dim Rng As Range, cell As Range
Dim pos As Long

Set Rng = ActiveSheet.Range("C2:C100") '<=== CHANGE!
For Each cell In Rng
pos = InStr(1, cell.Value, "x")
cell.Value = Right(cell.Value, Len(cell.Value) - pos)
Next
End Sub


Change the range address to your needs.


---
Regards,
Norman


"ToddG" wrote in message
...
Is this even possible?

I have a list of sizes contained in cells in Column C.

Column C
4 x 32 x 1
16 x 32 x 1.25
14.375 x 23 x 1.25
6.5 x 52 x 1.25
4.5 x 23 x 1.25
2.5 x 23 x 1.25

What I need to do is look at each populated cell in Column
C and remove the first number, the space following the
first number, the "x", and the space following the "x" so
I will end up with this:

Column C
32 x 1
32 x 1.25
23 x 1.25
52 x 1.25
23 x 1.25
23 x 1.25

This one is WAY beyond me, any help would be appreciated.