How to make two formulas reference the same cells in Excel?

I have one row that uses =MEAN(A1:A15), and another one that uses =SUM(A1:A15). But many times I have to alter this range to, let's say, A1:A13;A15 in both cells. I would like to alter the range in one place and have both formulas to use the same updated range.


Solution 1:

What you can do is use the INDIRECT formula along with another cell where you specify your range. The INDIRECT formula allows you to return a cell reference or range based on a text string. For example, you can set a cell equal to =INDIRECT("A2") and it will show the value of cell A2.

As for how this pertains to your question, if for example we place the text string A1:A15 in cell B1, you can then get the sum of that range with this formula: =SUM(INDIRECT(B1)). Modifying the range in cell B1 will then modify the computed sum accordingly, and you can also perform other formulas with that, like =MEAN(INDIRECT(B1)).

Solution 2:

You can use a named range to do this, and it's really the recommended way. That is where you give a name to a range of cells, and then you use that name in any formulas. You can later go back and update the range of cells that the name applies to. (You can also do more sophisticated things like having the range automatically adjust in size when you add rows at the end.)

Creating and applying named ranges is under Formula > Named Cells > Name a Range.

More details in this tutorial: http://www.homeandlearn.co.uk/excel2007/excel2007s7p6.html