Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]() the following code does not give me the current month and date when it creat the new sheet. On my C1 cell it has the function of =DATE(YEAR(NOW ()),MONTH(NOW()),1). the new creat sheet on C1 cell start with 01/01/2005 instead of the current month as 04/01/2005. Can someone help? --- Sub createsheets() If MsgBox("Are you very very sure you want to do this?", vbYesNo, "Create LOTS of Sheets") = vbYes Then For i = 1 To Day(DateSerial(Year(Date), Month (Date) + 1, 0)) Sheets("Sheet1").Copy Befo=Worksheets (Worksheets.Count) ActiveSheet.Name = i Range("C1").Value = i Next End If End Sub |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
count month when date is in day/month/year format | Excel Worksheet Functions | |||
Match Month in Date With Month in Header | Excel Worksheet Functions | |||
Date arithmetic: adding 1 month to prior end of month date | Excel Worksheet Functions | |||
Sort month/date/year data using month and date only | Excel Discussion (Misc queries) | |||
=VLOOKUP(1,Nationality!B5:B29,IF(MONTH(date)6,MONTH(date)-6, MON | Excel Worksheet Functions |