Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
move around cells
Hi Folks
All I want to do is: select a cell activate cell Go to start of cell Highlight first five characters Cut these characters Move left to adjacent cell paste characters to cell Move down Move right I'm quite happy to use a keyboard control to activate the macro each time I need it. I can do this in recorder but the cell ranges are hard coded. I need it to be local to the cell I am in. All help much appreciated. Joe |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
move around cells
Joe,
try this: Sub MoveAround() Dim CellVal As String CellVal = ActiveCell.Text Range(ActiveCell.Address) = Right(CellVal, Len(CellVal) - 5) ActiveCell.Offset(0, 1).Select Range(ActiveCell.Address) = Left(CellVal, 5) End Sub wrote in message ... Hi Folks All I want to do is: select a cell activate cell Go to start of cell Highlight first five characters Cut these characters Move left to adjacent cell paste characters to cell Move down Move right I'm quite happy to use a keyboard control to activate the macro each time I need it. I can do this in recorder but the cell ranges are hard coded. I need it to be local to the cell I am in. All help much appreciated. Joe |
#3
Posted to microsoft.public.excel.programming
|
|||
|
|||
move around cells
Joe,
forgot the "Move down - Move right" part: ActiveCell.Offset(1, 1).Select "Fred" wrote in message ... Joe, try this: Sub MoveAround() Dim CellVal As String CellVal = ActiveCell.Text Range(ActiveCell.Address) = Right(CellVal, Len(CellVal) - 5) ActiveCell.Offset(0, 1).Select Range(ActiveCell.Address) = Left(CellVal, 5) End Sub wrote in message ... Hi Folks All I want to do is: select a cell activate cell Go to start of cell Highlight first five characters Cut these characters Move left to adjacent cell paste characters to cell Move down Move right I'm quite happy to use a keyboard control to activate the macro each time I need it. I can do this in recorder but the cell ranges are hard coded. I need it to be local to the cell I am in. All help much appreciated. Joe |
#4
Posted to microsoft.public.excel.programming
|
|||
|
|||
move around cells
Hi Fred
You're a champ. Thanks for the help. -----Original Message----- Joe, forgot the "Move down - Move right" part: ActiveCell.Offset(1, 1).Select "Fred" wrote in message ... Joe, try this: Sub MoveAround() Dim CellVal As String CellVal = ActiveCell.Text Range(ActiveCell.Address) = Right(CellVal, Len (CellVal) - 5) ActiveCell.Offset(0, 1).Select Range(ActiveCell.Address) = Left(CellVal, 5) End Sub wrote in message ... Hi Folks All I want to do is: select a cell activate cell Go to start of cell Highlight first five characters Cut these characters Move left to adjacent cell paste characters to cell Move down Move right I'm quite happy to use a keyboard control to activate the macro each time I need it. I can do this in recorder but the cell ranges are hard coded. I need it to be local to the cell I am in. All help much appreciated. Joe . |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Move cells down | Excel Discussion (Misc queries) | |||
Can references (to cells being sorted) move with the cells? | Setting up and Configuration of Excel | |||
Move cells according to value | Excel Discussion (Misc queries) | |||
Sorting cells: a list behind the cells do not move with the cell | Excel Discussion (Misc queries) | |||
Move cells | Excel Programming |