Re: Cut and paste part of a string in VBA
From: Ron de Bruin (rondebruin_at_kabelfoon.nl)
Date: 05/07/04
- Next message: Ron de Bruin: "Re: Deleting part of a string in VBA"
- Previous message: DDM: "Re: Sorting Work Sheets? How?"
- In reply to: noah: "Re: Cut and paste part of a string in VBA"
- Next in thread: noah: "Re: Cut and paste part of a string in VBA"
- Reply: noah: "Re: Cut and paste part of a string in VBA"
- Messages sorted by: [ date ] [ thread ]
Date: Fri, 7 May 2004 22:02:37 +0200
Try this
Sub test()
Dim cell As Range
For Each cell In Columns("J").Cells.SpecialCells(xlCellTypeConstants)
cell.Offset(0, 2).Value = Right(cell.Value, 2)
cell.Value = Left(cell.Value, Len(cell.Value) - 2)
Next
End Sub
-- Regards Ron de Bruin http://www.rondebruin.nl "noah >" <<noah.15wfj4@excelforum-nospam.com> wrote in message news:noah.15wfj4@excelforum-nospam.com... > I have another code that does that same thing. But what I can't get it > to do; is delete the second 2 from column "J". In other-words, I need > column "J" to have only the far left remaining. > If column "J" has "ABC1" in a string, final result should be: Column > "J" = "AB" and column "L" = "C1". > AND sometimes column "J" will have a 5 character string like "ABCD1". > And then I still want column "L" to only have "D1" and column "J" = > "ABC" in final result. > I probably need to add another command to it...... > What do you think? > > > --- > Message posted from http://www.ExcelForum.com/ >
- Next message: Ron de Bruin: "Re: Deleting part of a string in VBA"
- Previous message: DDM: "Re: Sorting Work Sheets? How?"
- In reply to: noah: "Re: Cut and paste part of a string in VBA"
- Next in thread: noah: "Re: Cut and paste part of a string in VBA"
- Reply: noah: "Re: Cut and paste part of a string in VBA"
- Messages sorted by: [ date ] [ thread ]