Vba - create new sheet and copy date into it.

zerofeng

New Member
Joined
Apr 6, 2024
Messages
6
Office Version
  1. 2021
Platform
  1. Windows
Hi,

I would like to seek advice of below vba.

The code will auto create new sheet with the name from a3 cell under master sheet. The master list data will be append data for every month. From the code below, I'm not able to copy the data after generate new sheet with subsequent month as the paste value sheet is still under the same month.

a3=dropdown Month Eg JAN24, FEB24
Master D1: M+++(data will be updated each month)

Sub create ()

Dim Master As Workbook
Set Master = Workbooks("create sheet 1.xlsm")

Sheet.Add(After:=Sheets(Sheets count)).Name = Master.Worksheets("MASTER").Range("a3').value

Master.Worksheets("MASTER").range(D1:M7).Copy
Master.Worksheets("JAN24").Range("D5:AH17").PasteSpecial

End sub
 

Excel Facts

What did Pito Salas invent?
Pito Salas, working for Lotus, popularized what would become to be pivot tables. It was released as Lotus Improv in 1989.
Sorry wrong subject. It should be Vba - create new sheet and copy data into it.
 
Upvote 0

Forum statistics

Threads
1,223,842
Messages
6,174,978
Members
452,596
Latest member
Anabaric

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