Save to new worksheet and rename sheet to tomorrows/next working days date as ddmmyyyy

clubagreenie

New Member
Joined
Sep 12, 2019
Messages
3
From what I have now as below, I need to take the data generated, save to a new sheet and then rename that sheet to tomorrows or the next working days date (taking into account weekends/public holidays).

Is this actually achievable, or at best to excude weekends.

In additon can I alo insert the same date as a header in the sheet.

Below is what I have, which will do s rquired but only to todays date.

Code:
Intersect(ActiveSheet.UsedRange, Range("A:J")).Copy
        
        Dim szTodayDate As String
        szTodayDate = Format(Date, "ddmmyyyy")
        On Error GoTo MakeSheet
        Sheets(szTodayDate).Activate
        Exit Sub
MakeSheet:
        Sheets.Add , Worksheets(Worksheets.Count)
        ActiveSheet.Name = szTodayDate

        Sheets("szTodayDate").Range("A1").PasteSpecial Paste:=xlPasteValues
        Sheets("working").Application.CutCopyMode = False
 

Some videos you may like

Excel Facts

Did you know Excel offers Filter by Selection?
Add the AutoFilter icon to the Quick Access Toolbar. Select a cell containing Apple, click AutoFilter, and you will get all rows with Apple

Watch MrExcel Video

Forum statistics

Threads
1,109,148
Messages
5,527,091
Members
409,745
Latest member
CharlesAlsop

This Week's Hot Topics

Top