Hello,
this is my first post here so be gentle
I need to paste cell values from one column to another via button.
Code I use is this:
What I want is a way to make selected column "stuck" in macro. So, If I use this code above selection is moved from D5 to E5. I want to have that E5 setting saved so next time I use that macro it will start from E5 and move to F5. That setting should be saved even after I save workbook and close it completely.
Is that even possible and if yes, how?
I am learning VBA so be easy on me.
Regards,
Mario (Cadenzza)
this is my first post here so be gentle
I need to paste cell values from one column to another via button.
Code I use is this:
Code:
Sub Macro1()Dim myRange As Range
Range("AH5:AH32").Select
Selection.Copy
Range("D5").Select
Selection.PasteSpecial Paste:=xlPasteValues, Operation:=xlNone, SkipBlanks _
:=False, Transpose:=False
Set myRange = Selection
myRange.Offset(0, 1).Select
End Sub
What I want is a way to make selected column "stuck" in macro. So, If I use this code above selection is moved from D5 to E5. I want to have that E5 setting saved so next time I use that macro it will start from E5 and move to F5. That setting should be saved even after I save workbook and close it completely.
Is that even possible and if yes, how?
I am learning VBA so be easy on me.
Regards,
Mario (Cadenzza)