Pasting a formula through multiple worksheets

lukerees83

Board Regular
Joined
Mar 28, 2011
Messages
59
I have a formula that I want to insert into the same cell on every sheet in my workbook (Excel Mac 2011).

In theory, shouldn't I first highlight all the worksheet tabs at the bottom, then paste the formula into one of the appropriate cells on any sheet? Shouldn't I then find that it has been pasted throughout them all?

This is what I have tried and it has not worked, when I'm sure I have done it before (maybe on a different version). Is there something I need to change in my settings to make sure it does this as I want?
 

Excel Facts

How to create a cell-sized chart?
Tiny charts, called Sparklines, were added to Excel 2010. Look for Sparklines on the Insert tab.
Additional: I have just noticed that when I copied the original formula at the time I had all the tabs in the source workbook highlighted too. Could this have confused excel as to what instruction to use?

If I un-highlight all the tabs, then just click on one source cell containing the formula then paste it through the destination worksheets as described above, should this do the trick?
 
Upvote 0
First, you should copy cell with formula, then select sheets and paste this formula.
 
Upvote 0
Would this work for you? I've used B2 for the formula;
Code:
Sub InsertFormula()
Dim wSheet As Worksheet
For Each wSheet In Worksheets
    wSheet.Range("B2").Formula = "=NOW()" 'add your formula
    
 Next wSheet
 
End Sub

HTH
Colin
 
Upvote 0

Forum statistics

Threads
1,224,526
Messages
6,179,322
Members
452,906
Latest member
Belthazar

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