![]() |
Autofill to last row
I Have a calculation in M4 and I want it to autofill to the end of the data.
But the data could end in row 35 or 50 etc. How would I find the last row of data and autofill the formula down to it Thanks |
Autofill to last row
which column has the data? i used L on Sheet1 in this example
sub fill() dim lastrow as long lastRow = Worksheets("Sheet1").Cells(Rows.Count, "L").End(xlUp).Row Range("M4").AutoFill Range("m4:m" & lastRow) end sub -- Gary "Nigel" wrote in message ... I Have a calculation in M4 and I want it to autofill to the end of the data. But the data could end in row 35 or 50 etc. How would I find the last row of data and autofill the formula down to it Thanks |
All times are GMT +1. The time now is 09:20 PM. |
Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com