Auto numbering in Excel
I would like to know if anyone knows how to create a auto numbering formula
in a cell so that when you open the workbook/worksheet each time it either populates into the cell you want. Can this be a formula? Do I have to create a macro? Using Excel 2003 thanks.s -- GreggY |
Auto numbering in Excel
You'll need to use a macro. Open the VBA editor (Alt+F11) and go the the
ThisWorkbook sheet. Paste this code in: Private Sub Workbook_Open() 'Change Sheet name and Range to desired values Sheets("Sheet1").Range("A2").Value = Sheets("Sheet1").Range("A2").Value + 1 End Sub If you want the number to increase everytime the sheet is selected, go to the apprpriate sheet module in the VBA editor, and paste this: Private Sub Worksheet_Activate() 'Change Range callout as deisred Range("A2").Value = Range("A2").Value + 1 End Sub -- Best Regards, Luke M *Remember to click "yes" if this post helped you!* "Gregg Y" wrote: I would like to know if anyone knows how to create a auto numbering formula in a cell so that when you open the workbook/worksheet each time it either populates into the cell you want. Can this be a formula? Do I have to create a macro? Using Excel 2003 thanks.s -- GreggY |
All times are GMT +1. The time now is 05:54 PM. |
Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
ExcelBanter.com