Footer... Entering Serial Nos and incremnting daily

  • Thread starter Thread starter Gunjani
  • Start date Start date
G

Gunjani

In the footer, is it possible to AUTOmatically place a serial number,
say starting at 00035 on 18 November 2005, each time the date is
changed, daily, the serial number increment by the same number of days.
i.e

19/11/05.... 00036
20/11/05.... 00037
21/11/05.... 00038
22/11/05.... 00039

If it cannot be placed in the Footer is there any otherway?

Thanks for any suggestions.
 
Gunjani-

I would run the 1st macro on the 18th and then place the 2nd macro in the
ThisWorkbook module:

Sub StartFooter()
ActiveSheet.PageSetup.CenterFooter = "00035"
End Sub

Sub Workbook_Open()
Dim iDiff As Integer
Dim sNewNum As String
iDiff = Int(Now) - DateSerial(2005, 11, 18)
sNewNum = CStr(Format(35 + iDiff, "00000"))
ActiveSheet.PageSetup.CenterFooter = sNewNum
End Sub
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top