Discussion Locked

Auto numbering in excel

0 helpful
8 replies
Closed to new repliesThis discussion is closed. It stays readable, but it takes no new replies.
How do I insert a field that increases the number depending on an already existing excel file. The same way as in invoices and bills.(i.e. there are 10 excel files existing, so the next file should have number 11.)

8 replies

by dklippert

What are you numbering? The file name for the next Workbook, the next Worksheet, or a list?

by renedenhollander

A field in the new workbook must be increased by 1 depending on the same field in the last exising workbook. The workbook only contains 1 worksheet.

by dklippert

=[LastWorkbookName]Sheet1!$A$1+1
If there is a pattern to your naming convention, you can update the LastWorkbookName automatically. The Sheet1!$A$1 could also be cleaned up by using named ranges.

by renedenhollander

Poster rated this answer.
I had an error message telling me that "LastWorkbookName" did not exist. The name of that file has no pattern in it and depends on the customer name.

by dklippert

"LastWorkbookName" is just a suggestion.
Open both workbooks.
Type = in a cell of the new workbook.
Switch to the old one and click in the source cell. Add +1 in the Formula bar and hit the Enter key.

This discussion is closed to new replies.