the question from the "Titel already above"
I attached the sheet I made Its Accumulating Data
The Point is How to make a code can se the Last day of the Month In the Cell "whatsoever" and When Its last day of the Month - Giving U a Msg that "Today Is the Last day of the Month " and Automatically a New Shet with the Name Of the Month will e Created
Cheers
and thanks
Create new sheet based on cell date
-
-
-
Re: Creating New Sheet For the Next month Bases On the last day of te Month
alfa-alfa,
Do not create duplicate threads. If you need to upload an attachment to an existing thread, then
1. Click the EDIT POST button below your post in your original thread
2. Click Go Advanced
3. Scroll down to Manage Attachments.Your duplicate thread has been deleted.
-
Re: Creating New Sheet For the Next month Bases On the last day of te Month
"Sorry I did not notice that It did not upload -- now its One Post or 2 ?!!--is that the right place for answer ?!!!
-
Re: Create new sheet based on cell date
Try:
In Worksheet code module:Code
Display MoreOption Explicit Private Sub Worksheet_Change(ByVal Target As Range) On Error GoTo ErrorHandler If Target.Address = "[COLOR=blue]$E$4[/COLOR]" Then If Target.Value = Evaluate("DATE(YEAR(TODAY()),MONTH(TODAY())+1,0)") Then MsgBox "Today Is the Last day of the Month" Worksheets.Add(After:=Worksheets(Worksheets.Count)).Name = Format(Date, "mmmm") End If End If ErrorHandler: If Err.Number <> 0 Then MsgBox "Worksheet for this month already exists" Application.DisplayAlerts = False Worksheets(Worksheets.Count).Delete Application.DisplayAlerts = True End If On Error GoTo 0 End Sub
Just change the address $E$4 to whichever cell you want this to activate for. The code must go in the Worksheet for that cell of course. -
Re: Create new sheet based on cell date
The Code Is perfect except of the following
I need the code to be one of the step of Calculation
it means
1- check the date
2- calculate
3- if the date Already last day in the month "Create" a New Sheet "for the with the same Month month
with the whole data As back Up
What I have right Now in the Shest in create the Same Month "I mean If to day is 31/10 the Msg appear and to creat the New Sheet with the Same Formula and the Same data again as back up
Sorry I did not say that from very begining
Its my Mistake -
-
Re: Create new sheet based on cell date
I'm sorry I am a little difficulty understanding what you need.
Is Calculation a function you are writing?
Do you need a copy of the first sheet (formulas and data) made onto the newly created Worksheet?
Participate now!
Don’t have an account yet? Register yourself now and be a part of our community!