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.
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