Hi Guys,
I am attempting to select the last two rows, and autofill the formulas in those rows to the next two rows. I plan to call this eventually on a change event so: Data is entered into column D, that triggers the last two rows to autofill to the next two, so that there are always enough new rows for the user and they don't have to autofill themselves. I started by recording a macro and modifying some of the code but I am getting an error when it tries to run: "Compile Error: Invalid or unqualified reference" and it highlights ".Rows". I am sure I am missing something simple. Here is what I have so far:
Sub AddRows()
'
' AddRows Macro
' Adds rows when you run out.
'
' Keyboard Shortcut: Ctrl+Shift+R
Dim lRow As Long, llRow As Long
lRow = .Range("A" & .Rows.Count).End(xlUp).Row
llRow = lRow - 1
Range("A" & llRow & ":AB" & lRow).Select
' Range("A2584:AB2585").Select
Selection.AutoFill Destination:=Range("A2584:AB2587"), Type:=xlFillDefault
Range("A2584:AB2587").Select
End Sub
Bookmarks