Help? basic macro to paste sheet 1 onto all remain sheets of workbook?

gomak

New Member
Joined
Nov 3, 2011
Messages
4
I would like to copy all of sheet 1 (it has pictures, formatting, and formulas) and have it paste to all remaining worksheets in the workbook (800+ sheets) can someone help me with a simple macro to do this?

I have tried to record a macro by selecting sheet 1, copying it and pasting onto sheet 2, but I have no idea how to get it to repeat through the end of the workbook.

Thanks for any help!
 

Some videos you may like

Excel Facts

Which came first: VisiCalc or Lotus 1-2-3?
Dan Bricklin and Bob Frankston debuted VisiCalc in 1979 as a Visible Calculator. Lotus 1-2-3 debuted in the early 1980's, from Mitch Kapor.

John Davis

Well-known Member
Joined
Sep 11, 2007
Messages
3,457
I would like to copy all of sheet 1 (it has pictures, formatting, and formulas) and have it paste to all remaining worksheets in the workbook (800+ sheets) can someone help me with a simple macro to do this?

I have tried to record a macro by selecting sheet 1, copying it and pasting onto sheet 2, but I have no idea how to get it to repeat through the end of the workbook.

Thanks for any help!

Does this help?

Code:
Sub gomak()

For i = 2 To Sheets.Count

Sheets("Sheet1").Range("A1").CurrentRegion.Copy Sheets("Sheet" & i).Range("A1")

Next i

End Sub
 

gomak

New Member
Joined
Nov 3, 2011
Messages
4
Thanks for the code, but I am a getting an error. I believe it is do to the fact that all of my sheets have now been renamed from a list of invoice numbers. The original sheet that needs to be copied is named "141265" and then all of the remaining sheets are some combination of 6 numbers (e.g.: 123456, 784305, 862482, etc.). I appreciate your help very much!
 

John Davis

Well-known Member
Joined
Sep 11, 2007
Messages
3,457
Thanks for the code, but I am a getting an error. I believe it is do to the fact that all of my sheets have now been renamed from a list of invoice numbers. The original sheet that needs to be copied is named "141265" and then all of the remaining sheets are some combination of 6 numbers (e.g.: 123456, 784305, 862482, etc.). I appreciate your help very much!


Try this instead:

Code:
Sub gomak()

Dim ws As Worksheet

For Each ws In ThisWorkbook.Worksheets

If ws.Name <> "141265" Then

Sheets("141265").Range("A1").CurrentRegion.Copy ws.Range("A1")

End If

Next ws

End Sub
 

Watch MrExcel Video

Forum statistics

Threads
1,122,207
Messages
5,594,843
Members
413,944
Latest member
3xc3ln00b

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
Top