Splitting cells
On May 21, 12:36 pm, Bill wrote:
I have data like the following.
6.00 x 12.00 x 24.00 CRS
I would like to split out the last part (CRS) into another cell. There is
always a space before the data to split, but the rest may or may not have
spaces. Basically I need to go to the end of the cell and then back to the
space and split.
Thanks
Bill
Hello Bill,
Here is a macro that will remove the last part of the string. This
will work with Excel 2000 and up.
Macro Code
----------------------------------------------------------------------------------------------------------------------------------------------------------------------------
\
Sub Macro1()
Dim MyStr As String
Dim S As Long
MyStr = "6.00 x 12.00 x 24.00 CRS"
S = InStrRev(MyStr, " ")
MyStr = Left(MyStr, S)
End Sub
-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------
Sincerely,
Leith ROSS
|