Link to home
Start Free TrialLog in
Avatar of stmoritz
stmoritz

asked on

Excel VBA to filldown filled range by n rows

How do I have to amend the code below to fill down the last non-empty row by n (DailyRowsToInsert) rows?
TargetWsDaily.Activate
LastRow = Range("A" & Rows.Count).End(xlUp).Row
LastColumn = Cells(LastRow, Columns.Count).End(xlToLeft).Column

TargetWsDaily.Range("A" & LastRow & ":" & LastColumn & LastRow).FillDown

ActiveCell.Resize(LastRow, LastColumn).Copy Range(Cells(LastRow + DailyRowsToInsert, 1), Cells(LastRow, LastColumn))

Open in new window

ASKER CERTIFIED SOLUTION
Avatar of nutsch
nutsch
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of stmoritz
stmoritz

ASKER

perfect. thanks a lot.