G
Guest
I want to cut the last name from a cell and paste it to the adjacent cell. In the past, I have been able to automate this action (on a different system, different job).
I recorded the macro thus, starting in the cell with first and last name: F2 > ctrl shift right arrow > ctrl x > enter (move right) > ctrl v > down arrow > left arrow > stop recording [relative reference is on]. Instead of performing the desired action on the next line/cell, it duplicates the line above and does so ad nauseum if I activate the macro.
Here's the coding
Sub name(
' name Macr
' Macro recorded 3/2/2004 by J. S
' Keyboard Shortcut: Ctrl+
ActiveCell.FormulaR1C1 = "John J
ActiveCell.Offset(0, 1).Range("A1").Selec
ActiveSheet.Past
ActiveCell.Offset(1, -1).Range("A1").Selec
End Su
Can someone help me fix this macro? Thanks in advance if you can.
I recorded the macro thus, starting in the cell with first and last name: F2 > ctrl shift right arrow > ctrl x > enter (move right) > ctrl v > down arrow > left arrow > stop recording [relative reference is on]. Instead of performing the desired action on the next line/cell, it duplicates the line above and does so ad nauseum if I activate the macro.
Here's the coding
Sub name(
' name Macr
' Macro recorded 3/2/2004 by J. S
' Keyboard Shortcut: Ctrl+
ActiveCell.FormulaR1C1 = "John J
ActiveCell.Offset(0, 1).Range("A1").Selec
ActiveSheet.Past
ActiveCell.Offset(1, -1).Range("A1").Selec
End Su
Can someone help me fix this macro? Thanks in advance if you can.