From: Project Mangler on 16 May 2010 15:44 This is a case of where angels are too smart to tread: It only numbers down then over and puts n of nn pages into the top left cell in the "page". I leave modifications as an exercise for the reader. Sub PageNr() Dim pNrs As String Dim cnt As Long Dim n As Long Dim p As Long Dim pgHLen As Long Dim pgVLen As Long Dim riteCol As Long Dim btmRow As Long Dim hBound As Long Dim vBound As Long btmRow = Cells(Rows.Count, 1).End(xlUp).Row riteCol = Cells(1, Columns.Count).End(xlToLeft).Column pgHLen = ActiveSheet.HPageBreaks.Item(1).Location.Row - 1 pgVLen = ActiveSheet.VPageBreaks.Item(1).Location.Column - 1 If btmRow Mod pgHLen > 0 Then hBound = 1 Else hBound = 0 End If If riteCol Mod pgVLen > 0 Then vBound = 1 Else vBound = 0 End If pNrs = (ActiveSheet.HPageBreaks.Count + hBound) * (ActiveSheet.VPageBreaks.Count + vBound) cnt = 1 For p = 1 To riteCol Step pgVLen For n = 1 To btmRow Step pgHLen ActiveSheet.Cells(n, p) = cnt & " of " & pNrs & " pages" cnt = cnt + 1 Next n Next p End Sub "Lp12" <Lp12(a)discussions.microsoft.com> wrote in message news:BB85BF86-D71A-4133-AB91-3F130790A660(a)microsoft.com... > Hi, > I want to have the "page n of nn pages" to be represented in a specific cell > (not using the header functions). Is it possible to do so? > Thanks a lot in advance |