View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.misc
Susan Susan is offline
external usenet poster
 
Posts: 1,117
Default How to number all pages in all the worksheets continuously from1.

well, you could do it manually, but it's very tedious.
sheet1 cell A1 enter "1"
sheet2 cell A1 enter "=sheet1!A1+1"
sheet3 cell A1 enter "=sheet2!A1+1"

very tedious but works.
you could also write a macro to do it all at once.

Option Explicit

Sub increase_numbering()

Dim ws As Worksheet
Dim i As Integer
Dim r As Range

For Each ws In ActiveWorkbook.Worksheets
Set r = ws.Range("A1")

If ws.Name = "Sheet1" Then
r.Value = 1
i = 1
End If

If ws.Name < "Sheet1" Then
r.Value = i + 1
End If
Next ws

End Sub

hope that helps!
:) susan



On Oct 9, 7:18*am, M P Gupta
wrote:
I want that my workbook numbers from 1 onwards till the last page of the last
worksheet. I don't want each worksheet to start numbering from page no.1.
Please suggest a way for this.
--
M P Gupta