I'm trying to convert the static value of "X372:BV372" in line 1 on thescreenshot into a dynamic range based on last row, but I'm getting an "AutoFill method of Range class failed" with my modifed syntax in line 2 on the screenshot..
![]()
Sub Macro5() With Sheets("Data03") lrow = .Range("A" & Rows.Count).End(xlUp).row .Range("X" & lrow + 1).Formula = "=SUM(X3:X" & lrow & ")" 'Selection.AutoFill Destination:=Range("X372:BV372"), Type:=xlFillDefault <---- Recorded with the Excel Macro recorder Selection.AutoFill Destination:=Range("X" & lrow + 1 & ":BV" & lrow + 1), Type:=xlFillDefault <---- My modified syntax that errors out End With End Sub











LinkBack URL
About LinkBacks
screenshot into a dynamic range based on last row, but I'm getting an "AutoFill method of Range class failed" with my modifed syntax in line 2 on the screenshot..
Register To Reply

Bookmarks