Relatively new to VBA, so apologies if this is a poorly phrased question:
How can I set up a macro so that it will copy the entire row containing the active cell to the next empty row down?
Potential complications:
- All data is being entered in a pivot table due to other functions
- One column auto-calculates, does that count as not being empty?
- I managed to make a macro copy to the next row down, but it will overwrite that row as it stands.
(I know I could copy paste the row but I'm making a very large spreadsheet for other people who want to fill it as fast as possible.)
A brief description of what I have so far:
Sub CopyDown()
'
' CopyDown Macro
' duplicate current row
'
' Keyboard Shortcut: Ctrl+w
'
If IsEmpty(ActiveCell.Offset(1, 0).EntireRow) Then
'This part works
ActiveCell.Rows("1:1").EntireRow.Select
Selection.Copy
ActiveCell.Offset(1, 0).Rows("1:1").EntireRow.Select
ActiveSheet.Paste
'This part works
End If
End Sub
Advice would be appreciated, even if it's just the right keywords to search for this type of function.