ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Discussion (Misc queries) (https://www.excelbanter.com/excel-discussion-misc-queries/)
-   -   how do you add formulas on multiple excel sheets (https://www.excelbanter.com/excel-discussion-misc-queries/71279-how-do-you-add-formulas-multiple-excel-sheets.html)

undercoverangeltn

how do you add formulas on multiple excel sheets
 
I need to add several formulas on several different Excel spreadsheets and
not necessarily in the same cell or column. Is there a way to do this?



Jim May

how do you add formulas on multiple excel sheets
 
With code lines, like so:
with numbers in A1:A4 (1,2,3,4)

Sub Foo()
sheets("sheet1").range("A5").Formula = "=Sum(A1:A4)"
sheets("sheet2").range("A1").Formula = "='Sheet1'!A5"
End Sub


"undercoverangeltn" wrote:

I need to add several formulas on several different Excel spreadsheets and
not necessarily in the same cell or column. Is there a way to do this?




All times are GMT +1. The time now is 06:57 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
ExcelBanter.com