copy and date to new sheet

kendals

Board Regular
Joined
May 19, 2007
Messages
55
Hi, I have a workbook, i would like to copy from a sheet and then paste to a new sheet and date it with the current day.

how can do this?

thanks
Kendals
 

Excel Facts

Highlight Duplicates
Home, Conditional Formatting, Highlight Cells, Duplicate records, OK to add pink formatting to any duplicates in selected range.
I assume that you are looking for a VBA solution. Do you want to copy the whole sheet? Where do you want the date to go?
 
Upvote 0
vba

yes, thats right a vba. The date needs to be in the tab name of the sheet and in the sheet itself in a cell so the date can be seen.
 
Upvote 0
Try this:
Code:
Sub NewSheetAndDate()
Dim sh As Worksheet
Dim nsh As Worksheet
Set sh = Sheets("Sheet1")
Set nsh = Worksheets.Add
sh.Cells.Copy Destination:=nsh.Cells
nsh.Name = Format(Date, "dd-mm-yy")
nsh.Range("A1") = Date
End Sub
 
Upvote 0

Forum statistics

Threads
1,214,911
Messages
6,122,198
Members
449,072
Latest member
DW Draft

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