Hi all
This is my first time here, and im not very good with scripting, so bear with me
I'm trying to make a macro that copies a selected row and then changes a few values.
My macro so far is this:
This is what happens when i run the macro.
I can copy the selected row, and the "X" is removed. But i cant get the shown data below to be updated correctly.
I hope anyone can help me?
This is my first time here, and im not very good with scripting, so bear with me
I'm trying to make a macro that copies a selected row and then changes a few values.
My macro so far is this:
VBA Code:
Sub New_Revision2()
'
' New_Revision2 Macro
'
'
ActiveCell.EntireRow.Select
Selection.Copy
Selection.Insert Shift:=xlDown
Range("C" & (ActiveCell.Row)).Select
ActiveCell.FormulaR1C1 = "=R[-1]C"
Application.CutCopyMode = False
Selection.ClearContents
Range("U" & (ActiveCell.Row)).Select
ActiveCell.FormulaR1C1 = "=R[-1]C+1"
Range("V" & (ActiveCell.Row)).Select
ActiveCell.FormulaR1C1 = "=R3C2"
Intersect(Range("U:V"), ActiveCell.EntireRow).Select
ActiveCell.FormulaR1C1 = "=R[1]C"
Selection.Copy
Selection.PasteSpecial Paste:=xlPasteValues, Operation:=xlNone, SkipBlanks _
:=False, Transpose:=False
End Sub
This is what happens when i run the macro.
I can copy the selected row, and the "X" is removed. But i cant get the shown data below to be updated correctly.
I hope anyone can help me?
Last edited by a moderator: