macro needed to Copy/paste single cell info to all worksheets

Ribbon Guy

New Member
Joined
May 25, 2011
Messages
3
Novice needs help creating a macro that that will copy the contents of cell A1 on the first worksheet in a workbook on to all the worksheets in the workbook.

Example:
I want to type in a number to cell A1 hit a macro button and have the number populate cell A1 on all the sheets in the workbook.

Thank you in advance for your time.
 

Excel Facts

Which Excel functions can ignore hidden rows?
The SUBTOTAL and AGGREGATE functions ignore hidden rows. AGGREGATE can also exclude error cells and more.
Hello & Welcome to the Board,

How about...

Code:
Sub CopyA1()
    Dim ws As Worksheet
    For Each ws In ActiveWorkbook.Worksheets
        If ws.Name <> "Sheet1" Then
            Sheets("Sheet1").Range("A1").Copy ws.Range("A1")
        End If
    Next ws
End Sub
 
Upvote 0
Thank you for the prompt reply. Is there a wild card option for the first sheet name? ie: the first sheet is not always the same name.

Thanks!
 
Upvote 0
Code:
Sub CopyA1()
    Dim ws As Worksheet
    For Each ws In ActiveWorkbook.Worksheets
            Worksheets(1).Range("A1").Copy ws.Range("A1")
    Next ws
End Sub
 
Upvote 0

Forum statistics

Threads
1,224,618
Messages
6,179,917
Members
452,949
Latest member
beartooth91

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