View Single Post
  #3   Report Post  
Posted to microsoft.public.excel.misc
FiluDlidu FiluDlidu is offline
external usenet poster
 
Posts: 66
Default Hard code month in Excel

Of course I meant

Sub AddMonth()
For i = 1 To Sheets.Count
Sheets(i).Select
Range("A1").Formula = "=today()"
Range("A1").Value = Range("A1").Value
Range("A1").NumberFormat = "mmmm yyyy"
Range("A1").Select 'Not necessary, but you might like it...
Next i
Sheets(1).Select 'Not necessary, but again, you may find it useful
End Sub


Sorry for carelessness...

"FiluDlidu" wrote:

Hi Rachel,

Would this suits your needs?

Sub AddMonth()
For i = 1 To Sheets.Count
Sheets(i).Select
Range("A1").Formula = "=today()+30"
Range("A1").Value = Range("A1").Value
Range("A1").NumberFormat = "mmmm yyyy"
Range("A1").Select 'Not necessary, but you might like it...
Next i
Sheets(1).Select 'Not necessary, but again, you may find it useful
End Sub

Regards,
Feelu


"Rachel Costanza" wrote:

I have a excel workbook with 15 worksheets and every month when I produce the
annualized turnover I have to go into each header on each sheet to update the
month. Do you know of a way using VB or a DATE FUNCTION I can automate the
template to have the current month in the header? For example: Turnover
October 2008

Best,

Rachel