Simple Macro to copy line 2 to line 1

0

Hi Team,

I would like to have a macro which copies the entire row number 2 to row number 1 within same sheet. Say sheet name is "Karthik".

Thanks,

Karthik

Answer
Discuss

Answers

0

Here is a simple line of code to do that:

Sub copy_row()

Range("A2").EntireRow.Copy Range("A1")

End Sub

It works on whatever sheet you are looking at when you run the macro, whichever sheet is active.

Discuss

Answer the Question

You must create an account to use the forum. Create an Account or Login