Forum Discussion
OlbudMaciej
Mar 02, 2023Copper Contributor
Autofill numeration in row until last empty cell
Hi, How can I create macro which can autofill numeration in row. It have to end this macro at the end of this table. I was trying to make it in this way: It worked perfect, but in empty sheet. I...
Patrick2788
Mar 02, 2023Silver Contributor
You can pull this off without VBA. Please consider this solution:
'Dynamic range for the entries in Column B
=LET(b,Sheet1!$B$2:$B$100000,nonblank,COUNTA(b),TAKE(b,nonblank))
Sheet level formula:
The results of SEQUENCE are only as long as the number of rows from the dynamic range.
=LET(r,ROWS(Dynamic),SEQUENCE(r,,1,1))