ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Worksheet Functions (https://www.excelbanter.com/excel-worksheet-functions/)
-   -   Autofill (https://www.excelbanter.com/excel-worksheet-functions/32804-autofill.html)

sisco98

Autofill
 
Hi all,

I would like to use autofill in a macro, but the length of the range is
changing every time when I open the workbook.
The task would be that when I paste three column to range B:D, the macro
should autofill column A with numbers from 1 to the number of the last row.
For example, the last entry in column B is in row 67, autofill should fill
column A with numbers from 1 to 67.

Thank you in advance for!
--
sisco98

Don Guillett

incorportate this

lr=cells(rows.count,"b").end(xlup).row

--
Don Guillett
SalesAid Software

"sisco98" wrote in message
...
Hi all,

I would like to use autofill in a macro, but the length of the range is
changing every time when I open the workbook.
The task would be that when I paste three column to range B:D, the macro
should autofill column A with numbers from 1 to the number of the last

row.
For example, the last entry in column B is in row 67, autofill should fill
column A with numbers from 1 to 67.

Thank you in advance for!
--
sisco98





All times are GMT +1. The time now is 05:26 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
ExcelBanter.com