Forum Discussion

Connor Copeland's avatar
Connor Copeland
Copper Contributor
Apr 29, 2018
Solved

Trying to figure out to run one calculation across multiple sheets

Hello,
I have an excel file set up where the first page is a series of calculations and tables related to information on the proceeding pages.
Basically I am trying to run a formula that looks like =(SUM('1'!D2:D100000)/B2).
This captures the sum of an entire column in a particular page and divides it by its appropriate reference number.
Unfortunately, when I try to scale this to my entire sheet all of the wrong things, and none of the right things, get pulled down.
-When I finish the table I want '1' (the sheet I am referencing) to change, so the next row is 2, then 3, and so on. As of now this stays static at 1 and I have to manually change each column.
-I want "D2:D100000" To stay constant, I am trying to capture an entire column from the referenced sheet. As of now when I try to run this the next column goes "D3:D100001" and so on.
-Finally, I want "B" to stay, but "2" in "B2" to change so it goes B2, B3, B4 ect.

So when I type this in excel, and drag it to finish the table, the next formula should look like
=(SUM('2'!D2:D10000)/B3)

As of now the next formula would look like
=(SUM('1'!D3:D10001)/B3)
Anyone have any ideas?

  • Got It!
    The formula works like
    =(SUM(INDIRECT("'"&A2&"'!"&"$G$3:$G$10000"))/B2)
    This will save me countless hours and errors.

9 Replies

    • Connor Copeland's avatar
      Connor Copeland
      Copper Contributor
      Hello,
      Thank you for the quick reply! That takes care of the row shifts in D2-D10000, but the sheet number still stays on 1 unfortunately.
      • Logaraj Sekar's avatar
        Logaraj Sekar
        Steel Contributor

        Hi,

         

        Remove '1' in the formula. Coz, =SUM('1'!$D$2:$D$100000)/$B2 will work only for sheet named as 1.

         

        Put formula as =SUM($D$2:$D$100000)/$B2 which will work on any sheet.