SOLVED

'Open-ended' sequential numbering of Rows in Excel...

Copper Contributor

I have been looking at the SEQUENCE function but, if I understand it correctly, you need to enter an end point for how many sequential numbers you want Excel to autofill (e.g. 1 to 1000)? 

Is there a way to get Excel to autofill a sequential number when new data is entered in a Row?

For example, Column A is sequential numbers starting with '1' (without the ' ' inverted commas) in A1, then 2 in A2 etc and every time data is entered in a new Row in Column B (for example), a new sequential number is entered automatically in the same Row in Column A? TIA

9 Replies
best response confirmed by HansVogelaar (MVP)
Solution

@UKdeejay 

Something like

=SEQUENCE(COUNTA(B:B))

in A1

Thanks @SergeiBaklan - that worked well.
For some reason the 'Like' button isn't working...?

@UKdeejay , you are welcome.

Have no idea the this button doesn't work, but don't worry

 

I hope it is OK to ask a follow-up question on this Thread...

If I want to continue the automatic, sequential numbering of Rows on the next Worksheet in the SAME Workbook, is that possible?
For instance, if sequential numbering of Rows on Sheet 1 is let's say, 1 to 100, can I start sequential numbering of Rows on Sheet 2 at 101? TIA

@UKdeejay 

Does this do what you want?

 

=SEQUENCE(COUNTA(B:B), , COUNTA('Sheet 1'!B:B)+1)

 

where Sheet 1 is the name of the first sheet.

That worked, thanks. Hopefully I can edit it to work across multiple Worksheets in my Workbook.
I spoke too soon...! It worked between Sheet 1 and Sheet 2 - numbering continued from the last number on Sheet 1 and started with the next number on Sheet 2 - but even though I changed the Sheet Name in the function between Sheets, the numbers auto-filled in the following Sheets were not as expected!

@UKdeejay

On Sheet 2, you can use

=SEQUENCE(COUNTA(B:B), , MAX('Sheet 1'!A:A)+1)

and on Sheet 3:

=SEQUENCE(COUNTA(B:B), , MAX('Sheet 2'!A:A)+1)

Etc.

That worked brilliantly, thanks.
1 best response

Accepted Solutions
best response confirmed by HansVogelaar (MVP)
Solution

@UKdeejay 

Something like

=SEQUENCE(COUNTA(B:B))

in A1

View solution in original post