Forum Discussion
Thomas2170
May 18, 2020Copper Contributor
Re: Use VBA to Autofill a Row until the end of the number of data in another row
Thanks@Haytham,
But i m facing one issue that it is autofilling as 1 I want it be filled in series. Like 1,2,3 and so on
But i m facing one issue that it is autofilling as 1 I want it be filled in series. Like 1,2,3 and so on
2 Replies
- Haytham AmairahSilver Contributor
Hi,
Please use this below instead, and tell me what you think.
Sub AutoFillToRight() Dim lastCellFromRight As String ActiveCell.Select lastCellFromRight = Selection.End(xlDown).End(xlToRight).Offset(-1, 0).Address If lastCellFromRight = "$XFD$1048575" Or lastCellFromRight = "$IV$65535" Then Exit Sub Range(ActiveCell.Address, lastCellFromRight).FillUp Range(lastCellFromRight).Select End SubRegards
- Thomas2170Copper ContributorPlease also could you help me with the same for autofill ing down in series depending on data in the coloumn beside it