user3275237
user3275237

Reputation: 21

VBA code to select last row amd next empty row

I am trying to write a VBA code that selects the last non-empty row and the next empty row and do a data series to autofill the date but not getting a headway, please assist. code is below:

ActiveWindow.SmallScroll Down:=9
Range("A8560:A8561").Select
Selection.DataSeries Rowcol:=xlColumns, Type:=xlChronological, Date:= _
    xlDay, Step:=1, Trend:=False

Thanks in advance.

Upvotes: 0

Views: 222

Answers (1)

Socii
Socii

Reputation: 545

To select the last non-empty row in column A use:

Cells(Rows.Count, 1).End(xlUp).Activate

Upvotes: 1

Related Questions