Quickly Adding Formulas Referencing Multiple Worksheets

Written by Allen Wyatt (last updated May 24, 2025)
This tip applies to Excel 2007, 2010, 2013, 2016, 2019, 2021, 2024, and Excel in Microsoft 365


2

Tyler has a workbook with a Trends worksheet followed by a worksheet for each day of the year. He needs to populate the Trends worksheet with data from every other worksheet. The cell needed is constant within each sheet. Tyler wonders how he can grab that data without manually doing "=A23" for each of the 365 worksheets.

There are a couple of ways you can approach this task, depending on exactly what you want to do. If you just want to get a sum for all of the 365 worksheets, you could use a formula such as the following:

=SUM('Day1:Day365'!A23)

This assumes that your worksheets are named Day1 through Day365. An easy way to remove all doubt, however, is to follow these steps:

  1. Select the cell in the Trends worksheet where you want to enter your formula.
  2. Start to type in the formula: =SUM(
  3. Click on the first worksheet tab (the one for the first day).
  4. Hold down the Shift key as you click on the last worksheet tab (the one for the last day). Your formula should now look similar to this: =SUM('Day1:Day365'!
  5. Click the cell you want summed, in this case cell A23. (It doesn't matter which worksheet you do this on.) Your formula will now look similar to this: =SUM('Day1:Day365'!A23
  6. Press Enter. This finishes out the formula for you.

Of course, you may not want to sum a cell across worksheets. You may, in fact, simply want to list all 365 values in the Trends worksheet. In that case, the easiest method is to list all of the worksheet names just to the left of where you want the values listed. For instance, you might include all the worksheet names in column A. You can then use the INDIRECT function in a formula in column B:

=INDIRECT("'"&A7&"'!A23")

Copy this down as many cells as necessary, and you end up with the desired values pulled from those other worksheets into column B. (See Figure 1.)

Figure 1. Pulling values into the Trends worksheet.

You can do away with the worksheet names in column A if you make sure your worksheets are named with some sort of pattern. For instance, you might have them named something like "Jan 01" through "Dec 31". In that case, you just modify the formula in column B, to something like this:

=INDIRECT("'"& TEXT(DATE(2019,1,ROW()-6), "mmm dd")&"'!A23")

Copy the formula down as many cells as necessary, and you have the values you want. (See Figure 2.)

Figure 2. Pulling values into the Trends worksheet using dates.

Note that the formula subtracts 6 from what the ROW function returns because it is being entered into cell B7. If you are actually putting this formula into a different row, you'll want to adjust what you actually subtract.

ExcelTips is your source for cost-effective Microsoft Excel training. This tip (6089) applies to Microsoft Excel 2007, 2010, 2013, 2016, 2019, 2021, 2024, and Excel in Microsoft 365.

Author Bio

Allen Wyatt

With more than 50 non-fiction books and numerous magazine articles to his credit, Allen Wyatt is an internationally recognized author. He is president of Sharon Parq Associates, a computer and publishing services company. ...

MORE FROM ALLEN

Adding Hyperlinks

Adding a hyperlink to s text selection is easy to do in Word. All you need to do is make a couple of clicks and specify ...

Discover More

Editing a Toolbar Button Image

Don't like the toolbar button images in your version of Excel? Don't fret; you can pull up the button editor and make ...

Discover More

Jumping Back to the TOC

Word allows you to create a table of contents that provides hyperlinks to headings within your document. It doesn't make ...

Discover More

Dive Deep into Macros! Make Excel do things you thought were impossible, discover techniques you won't find anywhere else, and create powerful automated reports. Bill Jelen and Tracy Syrstad help you instantly visualize information to make it actionable. You’ll find step-by-step instructions, real-world case studies, and 50 workbooks packed with examples and solutions. Check out Microsoft Excel 2019 VBA and Macros today!

More ExcelTips (ribbon)

Counting Jobs Completed On a Date

When you store the date and time in a single cell, it can be a bit confusing to count how many cells contain a particular ...

Discover More

Applying Range Names to Formulas

If you define your named ranges after you create your formulas, you can have Excel update those formulas to reflect the ...

Discover More

Transposing and Linking

Sometimes it is helpful to look at data that is rotated 90 degrees. Excel allows you to use Paste Special to transpose ...

Discover More
Subscribe

FREE SERVICE: Get tips like this every week in ExcelTips, a free productivity newsletter. Enter your address and click "Subscribe."

View most recent newsletter.

Comments

If you would like to add an image to your comment (not an avatar, but an image to help in making the point of your comment), include the characters [{fig}] (all 7 characters, in the sequence shown) in your comment text. You’ll be prompted to upload your image when you submit the comment. Maximum image size is 6Mpixels. Images larger than 600px wide or 1000px tall will be reduced. Up to three images may be included in a comment. All images are subject to review. Commenting privileges may be curtailed if inappropriate images are posted.

What is seven more than 1?

2025-05-26 11:35:31

J. Woolley

A common contiguous range on sequential worksheets in any single workbook (like 'Day1:Day365'!A23) is often called a 3D range. The following Excel functions do not work with 3D ranges: COUNTBLANK, COUNTIF, SUMIF, and AVERAGEIF. Note MAXIF and MINIF are not available in Excel.
My Excel Toolbox includes the following functions that support 3D ranges as well as ordinary ranges: COUNTBLANK3D, COUNTIF3D, SUMIF3D, AVERAGEIF3D, MAXIF3D, and MINIF3D.
The Tip discusses examples of the INDIRECT function to create a list of all the values in a 3D range, but with Excel 2024 or later you can use VSTACK like this:
    =VSTACK('Day1:Day365'!A23)
Using My Excel Toolbox functions ForEachItem and ListSheets, here's the equivalent formula (assuming 'Day1:Day365' represents all sheets in the workbook):
    =TRANSPOSE(ForEachItem(ListSheets(FALSE, TRUE), "@!A23"))
ForEachItem is described in my comment here: https://tips.net/T011725
ListSheets is described in my comment here: https://tips.net/T007094
See https://sites.google.com/view/MyExcelToolbox/


2025-05-26 02:00:38

Enno

The situation is somewhat more complicated than presented:
- It is not necessary to number the worksheets consecutively, only the order of the sheets counts. The sum shown also works if the sheets are called “test”, “sheet1”, “abc” “xxxyyyy”, for example, if you first click on “test” and then on “xxxyyyy”.
- If you move one of the sheets so that it is after the last one, it is no longer included in the sum.
- If you insert a sheet, it will be added to the sum. This does not apply if you only had two sheets in the sum before inserting.

Translated with DeepL.com (free version)


This Site

Got a version of Excel that uses the ribbon interface (Excel 2007 or later)? This site is for you! If you use an earlier version of Excel, visit our ExcelTips site focusing on the menu interface.

Newest Tips
Subscribe

FREE SERVICE: Get tips like this every week in ExcelTips, a free productivity newsletter. Enter your address and click "Subscribe."

(Your e-mail address is not shared with anyone, ever.)

View the most recent newsletter.