ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Discussion (Misc queries) (https://www.excelbanter.com/excel-discussion-misc-queries/)
-   -   Footer... Entering Serial Nos and incremnting daily (https://www.excelbanter.com/excel-discussion-misc-queries/55080-footer-entering-serial-nos-incremnting-daily.html)

Gunjani

Footer... Entering Serial Nos and incremnting daily
 

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.


Jason Morin

Footer... Entering Serial Nos and incremnting daily
 
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

---
HTH
Jason
Atlanta, GA


"Gunjani" wrote:


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.




All times are GMT +1. The time now is 08:26 AM.

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