Prev Previous Post   Next Post Next
  #6   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 10,124
Default Month formula


sheet1
or
sheets("fa2e")

--
Don Guillett
SalesAid Software

"Dar" wrote in message
...
I have named the worksheets (FA2E), (FA2W), etc. When I leave the macro as
is (Sheet1) I get an error, subscript out of range. When I change Sheet1
to
FA2E, which happens to be sheet1, it works.

"Don Guillett" wrote:


The one I presented will do it for all sheets everytime you print.

--
Don Guillett
SalesAid Software

"Dar" wrote in message
...
That worked perfectly. Now one last thing. I have 12 other tabs
(worksheets) that the macro should cycle through. Can you add the code
for
that.
I know it should be something that has
For Each sh............
Thanks.

"Dave Peterson" wrote:

You could have a dedicated macro that you run once a month to update
the
header--or you could change the header each time you open the file (or
even each
time you print the file).

This changes the header each time the workbook is opened--whether it
needs it or
not:

Option Explicit
Sub Auto_Open()

Dim wks As Worksheet

Set wks = Worksheets("Sheet1")

With wks.PageSetup
.CenterHeader = Format(Date, "mmmm")
End With
End Sub

I'd record a macro that formatted that header the exact way that I
want
it. Use
XXXXX as the month name and replace "XXXXX" in the recorded code with
Format(date,"mmmm").

If you need help post back with your current code.

If you're new to macros, you may want to read David McRitchie's intro
at:
http://www.mvps.org/dmcritchie/excel/getstarted.htm


Dar wrote:

Is it possible to have a Month formula in a custom header, so that
as
the new
month begins, the header will display the Name of the Month.
Example, =Text(Today(),"mmmm") will show December right now in a
cell,
and
when January arrives, will show January.
But I want somehow to have the Month show up in the header, since
others
will be using the worksheet and don't want to have to change the
header
themselves.

--

Dave Peterson






 
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
Formula for calculating 12 month rolling period Stroodle Excel Discussion (Misc queries) 0 August 17th 06 03:16 PM
Weekday formula calculating to end of month DebbieK Excel Worksheet Functions 0 July 26th 06 08:08 PM
Formula = Today's date + 1 month jermsalerms Excel Worksheet Functions 5 February 8th 06 09:51 AM
Formula Problem - interrupted by #VALUE! in other cells!? Ted Excel Worksheet Functions 17 November 25th 05 05:18 PM
Formula for # of sales days in a month? Kerry Rosvold Excel Worksheet Functions 2 June 1st 05 09:11 PM


All times are GMT +1. The time now is 11:04 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"