View Full Version : [SOLVED:] Sequential Cell Numbering
shejinummer
04-13-2009, 11:17 PM
I want to serialise a cell in the workbook i.e. whenever i create or copy a new work sheet, it has to give me a new following serial , like in invoices...
need help please
Simon Lloyd
04-13-2009, 11:21 PM
I want to serialise a cell in the workbook i.e. whenever i create or copy a new work sheet, it has to give me a new following serial , like in invoices...
need help pleaseHow will you create the copy? will it be via code or manually?
shejinummer
04-13-2009, 11:28 PM
create the sheet manually, but giving a vbscript to the workbook
Simon Lloyd
04-14-2009, 03:47 AM
Well, you could add a macro button to your toolbar and click it to make a copy using this code, but beware it is set to work on the active sheet, it works on the basis of increasing a number in a cell (in this case A1).
Dim MySheet
MySheet = ActiveSheet.Name
ActiveSheet.Copy Before:=Sheets(1)
ActiveSheet.Name = ActiveSheet.Range("A1")
Sheets(MySheet).Range("A1") = Sheets(MySheet).Range("A1") + 1
Sheets(MySheet).Activate
Bob Phillips
04-14-2009, 03:49 AM
See http://www.mcgimpsey.com/excel/udfs/sequentialnums.html
Powered by vBulletin® Version 4.2.5 Copyright © 2025 vBulletin Solutions Inc. All rights reserved.