Help with Macro to copy multiple sheets in a new worksheet to be renamed on a range...

aashish83

Board Regular
Joined
Feb 15, 2022
Messages
62
Office Version
  1. 365
Platform
  1. Windows
What i want is what below the below code does but in a new WorkBook and if i have multiple ranges? for e.g. my second range would be B19:B2700 and if that is so it should Copy Sheet FSR Level B instead of FSR Level A and third Range would be C19:C2700 and output to be FSR Level C sheet. Greatly appreciate any help on this

Sub Create_CentralA()
Dim sh1 As Worksheet, sh2 As Worksheet


Set sh1 = Sheets("FSR Level A")


Set sh2 = Sheets("BI")



For Each c In sh2.Range("A35:A2700", Range("A" & Rows.Count).End(xlUp)).SpecialCells(xlConstants)
sh1.Copy After:=Sheets(Sheets.Count)
ActiveSheet.Name = c.Value
Next

End Sub
 

Excel Facts

What is the last column in Excel?
Excel columns run from A to Z, AA to AZ, AAA to XFD. The last column is XFD.

Forum statistics

Threads
1,215,178
Messages
6,123,484
Members
449,100
Latest member
sktz

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