Allow copied worksheet to have duplicates with Date & (2),(3) etc Please Help!

Cozza22

New Member
Joined
Jan 23, 2022
Messages
6
Office Version
  1. 365
  2. 2019
Platform
  1. Windows
  2. Mobile
Sub CopySheet()

Worksheets("Sheet3").Copy after:=Worksheets(3)

ActiveSheet.Name = Format(ActiveSheet.Range("D28").Value, ("DD-MM-YY"))

End Sub
 

Excel Facts

Excel Wisdom
Using a mouse in Excel is the work equivalent of wearing a lanyard when you first get to college
Expert help please!

Apologies should have noted as you'll have guessed I'm new to VBA and have looked at other similar posts and ran the code but get various errors but can't seem to figure out what I need to allow the copied sheet renamed will cell D28 value which is a date to allow duplicated sheet.

E.g. 06-02-23 if ran again as changes made the new sheet will be 06-02-23 (2) then 06-02-23 (3).

The next step would be to add the text "Wk Comm" before D28 value.

Thank you.
 
Upvote 0
I have figured this out now so am closing it.
 
Upvote 0
Good to hear you got the solution.
If you would like to post the solution then it is perfectly fine to mark your post as the solution to help future readers. Otherwise, please do not mark a post that doesn't contain a solution.
 
Upvote 0

Forum statistics

Threads
1,215,338
Messages
6,124,360
Members
449,155
Latest member
ravioli44

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top