0

I have a Sub to add ascending number to each cell in a column to last row starting on 2nd row but row two starts on 2 I need it to start on 1 and I can not figure out how to get the 2nd row to start on 1 and count down to last row

Thanks

Sub AutoCount()

Dim LR As Long

LR = Range("A" & Rows.Count).End(xlUp).Row
Range("L2:L" & LR).Formula = "=ROW(L2)"

End Sub
4

1 回答 1

2

而不是"=ROW(L2)",使用"=ROW(L2)-1".

于 2013-06-12T19:20:32.873 回答