Forum Discussion
Andre1110
Oct 19, 2021Copper Contributor
Fill a column with the same number
Hi, who can help with vba codes that fills the column with the same number. E.g. column A2 to fill with 1 using last row (so it fills untill last row). I tried different methods and it fills sequence numbers like 1,2,3,4..etc, I want 1,1,1,1. Thx in advance, (nothing in youtube so not sure if it is possible).
2 Replies
- Deleted
Hey,
is it necessary to do it in VBA? You could also use the =SEQUENCE function.
E.g. you want to fill all 1's in column A based on used rows in column B:
=SEQUENCE(COUNTA(B:B);;1;0)- Andre1110Copper ContributorThx, yes I want vba codes. Thx anyway, good to know the formula as well.