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

Select all contiguous cells
Pressing Ctrl+* (asterisk) will select the "current region" - all contiguous cells in all directions.
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,829
Messages
6,121,827
Members
449,051
Latest member
excelquestion515

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