How to copy all data from one sheet to another and rename

November 28, 2013 at 12:22:29
Specs: Windows 8, 8 gigs
Is there a formula to copy all the data from my worksheet titled Template to a new tab and rename the tab by the clients name and date? My data is captured in column C with C3 detailing the clients name (dropdown list) and C1 with the date. I am also using the tab reference to create a summary schedule of all the tabs with the "indirect" formula, If there is a way to auto capture the tab reference on the summary schedule that would be extremely helpful.

I have not used macros before however tried one of the macros on the site to create a new sheet and it worked, I just don't know how to get the data replicated.

Your assistance would be most appreciated.

See More: How to copy all data from one sheet to another and rename

Report •

November 28, 2013 at 20:12:59
Please click on the following line and read the instructions on how to post code in this forum, then post the code you are using to create the new sheet. It may be possible to add a few lines to your existing to code to accomplish your goal.

Click Here Before Posting Data or VBA Code ---> How To Post Data or Code.

Report •

November 29, 2013 at 00:10:38
Hi DerbyDad03

Thank you for your swift response, I will post the code after this. I would clarify thou, I found the online and is a "macro to: Add new sheet, then rename new sheet with today's date" and followed the instructions for that hoping I could figure it out and modify the code myself if I could get the code to work first.

Also, I do not want to delete the template after creating a new sheet as I will continuously use the same to create additional tabs.

Thank you for your assistance

Report •

November 29, 2013 at 00:12:06
Hit Alt and F11 to open the VB editor,
Click 'Insert' > 'Module'
In the empty screen cut and paste this into it:-

Sub NewSheet()
On Error GoTo Error
Dim AddSheet
AddSheet = Format(Date, "dd mmm yy")
ActiveSheet.Name = AddSheet
Exit Sub
Application.DisplayAlerts = False
Application.DisplayAlerts = True
MsgBox "A Sheet named " & AddSheet & " already exists."
End Sub

Exit the VB editor,
Click 'Views' > 'Toolbars' > 'Forms' > 'Button' to put a cammand button on 
the sheet,
Right click the Button, select 'Assign Macro', click 'NewSheet'
Rename the Button and move it where you want it and there you go,

Report •

Related Solutions

December 2, 2013 at 12:20:26

Somebody please help. I am spending a lot of personal time trying to figure this out and any assistance/clarity on how to do this would be most appreciated.

Report •

Ask Question