Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.misc
phil@work
 
Posts: n/a
Default How do I set a date formula in the page setup header to add 10

Need to display todays date plus 10 in the page setup header.
  #2   Report Post  
Posted to microsoft.public.excel.misc
CLR
 
Posts: n/a
Default How do I set a date formula in the page setup header to add 10

This macro should do it.........

Sub DatePlus10ToHeader()
With ActiveSheet.PageSetup
.LeftHeader = Month(Date) & "/" & Day(Date) + 10 & "/" & Year(Date)
End With
End Sub


Vaya con Dios,
Chuck, CABGx3




"phil@work" wrote:

Need to display todays date plus 10 in the page setup header.

  #3   Report Post  
Posted to microsoft.public.excel.misc
Dave Peterson
 
Posts: n/a
Default How do I set a date formula in the page setup header to add 10

I think I'd use:

Sub DatePlus10ToHeader()
With ActiveSheet.PageSetup
.LeftHeader = format(date+10,"mm/dd/yyyy")
End With
End Sub

When you concatenated the string, day(date)+10 might not be the day you want.

CLR wrote:

This macro should do it.........

Sub DatePlus10ToHeader()
With ActiveSheet.PageSetup
.LeftHeader = Month(Date) & "/" & Day(Date) + 10 & "/" & Year(Date)
End With
End Sub

Vaya con Dios,
Chuck, CABGx3

"phil@work" wrote:

Need to display todays date plus 10 in the page setup header.


--

Dave Peterson
  #4   Report Post  
Posted to microsoft.public.excel.misc
CLR
 
Posts: n/a
Default How do I set a date formula in the page setup header to add 10

Agreed Dave.......thanks for making the point.

Vaya con Dios,
Chuck, CABGx3



"Dave Peterson" wrote:

I think I'd use:

Sub DatePlus10ToHeader()
With ActiveSheet.PageSetup
.LeftHeader = format(date+10,"mm/dd/yyyy")
End With
End Sub

When you concatenated the string, day(date)+10 might not be the day you want.

CLR wrote:

This macro should do it.........

Sub DatePlus10ToHeader()
With ActiveSheet.PageSetup
.LeftHeader = Month(Date) & "/" & Day(Date) + 10 & "/" & Year(Date)
End With
End Sub

Vaya con Dios,
Chuck, CABGx3

"phil@work" wrote:

Need to display todays date plus 10 in the page setup header.


--

Dave Peterson

Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Complicated formula please help asap! babiigirl Excel Worksheet Functions 8 June 14th 06 04:26 PM
Formula for determining if two date columns fall within specific date range Igottabeme Excel Worksheet Functions 2 April 21st 06 02:50 AM
Formula for determining if two date columns fall within specific date range Igottabeme Excel Discussion (Misc queries) 1 April 20th 06 10:03 PM
Dynamic Range with unused formula messing up x axis on dynamic graph [email protected] Charts and Charting in Excel 2 February 2nd 06 08:02 PM
formula for filtering and a defaulting date Sue Excel Worksheet Functions 3 July 26th 05 02:18 PM


All times are GMT +1. The time now is 09:11 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"