Copying & Pasting into a newly created worksheet

G

Guest

Hi, Can anyone help with this?
I want to copy and paste values from one worksheet into another, but I want
a new tab to be created each time. For example: I want the workbook to create
a new tab, rename the tab according to a name or number in a certain cell
from the main tab/Sheet and copy data from the main tab into it. Then when I
run the macro again it would create another new tab and so on. I hope that
makes sense.
I can put together the copy and paste bit, it’s the how to create a new tab
and name it according to values or text from a certain cell that I am having
trouble with
Help greatly appreciated
 
D

Don Guillett

right click sheet tab>view code>copy/paste this. Double click on the cell
with the name desired

Private Sub Worksheet_BeforeDoubleClick(ByVal Target As Range, Cancel As
Boolean)
Sheets.Add.Name = Target.Value
End Sub
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top