I'm looking for a macro that will copy & paste value a range of cells UP by a certain number of rows based on a value put into an input box.
I have a macro that allows me to copy a row of formulas down based on an input box but I haven't been able to manipulate it to do what I'm after above.
Sub Add_New_Rows_at_Bottom()
Dim LR As Long
Dim j As Variant
Sheets("Sheet1").Select
LR = Cells(Rows.Count, 1).End(xlUp).Row
j = InputBox("Enter number of rows to be added:")
Sheet5.Range("A20:V20").Copy Sheet1.Range("A" & LR + 1).Resize(j)
Sheets("Sheet1").Range("J" & Rows.Count).End(xlUp).Offset(1).Select
End Sub
Any ideas?
I have a macro that allows me to copy a row of formulas down based on an input box but I haven't been able to manipulate it to do what I'm after above.
Sub Add_New_Rows_at_Bottom()
Dim LR As Long
Dim j As Variant
Sheets("Sheet1").Select
LR = Cells(Rows.Count, 1).End(xlUp).Row
j = InputBox("Enter number of rows to be added:")
Sheet5.Range("A20:V20").Copy Sheet1.Range("A" & LR + 1).Resize(j)
Sheets("Sheet1").Range("J" & Rows.Count).End(xlUp).Offset(1).Select
End Sub
Any ideas?