ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Discussion (Misc queries) (https://www.excelbanter.com/excel-discussion-misc-queries/)
-   -   Excel numbering in a workbook (https://www.excelbanter.com/excel-discussion-misc-queries/186896-excel-numbering-workbook.html)

forest8

Excel numbering in a workbook
 
Hi

I currently have a excel workbook that has about 600 individual sheets. I
would like to hardcode a page number of each page. I don't really want to
enter the page numbers manually and was hoping that someone may have a macro
for this.

Any help will be greatly appreciated.




Mike H

Excel numbering in a workbook
 
Hi,

Right click any worksheet tab, view code and paste this in and run it.
Change the range to where you want the number

Sub numberem()
For x = 1 To Worksheets.Count
Sheets(x).Range("A1").Value = x
Next
End Sub

Mike

"forest8" wrote:

Hi

I currently have a excel workbook that has about 600 individual sheets. I
would like to hardcode a page number of each page. I don't really want to
enter the page numbers manually and was hoping that someone may have a macro
for this.

Any help will be greatly appreciated.





All times are GMT +1. The time now is 01:58 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com