Go Back

How to Find the SUM of a Range with the INDEX Function

We can find the sum of a range with the INDEX function. The steps below will walk through the process.

Figure 1: Result of the SUM of a Range (THE ROWS) with the INDEX Function

Setting up the Data

We will set up the data following the scheme in figure 2.

  • Cell A4 to Cell A7 will contain the different Branches
  • Cell B3, Cell C3, and Cell D3 will contain the profits from 2018 to 2016
  • Cell E3 will be titled as TOTAL
  • Cell B4 to Cell D7 will contain the profits for each year for the branches

Figure 2: How to Find the SUM of a Range with the INDEX Function

General Formula

=SUM(INDEX(array,column_number,row_number,))

Array refers to the range in the spreadsheet that we intend to sum.

SUM of a Range (ROW) with the INDEX Function

Let us sum the profit for the three years of Texas branch

  • We will click on Cell E4 and input the formula below

=SUM(INDEX(B4:D7,1,0))

Figure 3: SUM of a Range with the INDEX Function

  • We will press Enter

Figure 4: SUM of a Range with the INDEX Function

  • We will use the drop-down feature to get the sum of the other branches

Figure 5: Result of the SUM of a Range (THE ROWS) with the INDEX Function

Explanation

Formula: =SUM(INDEX(B4:D7,1,0))

In this formula, the INDEX function returns the row number contained in the range. This happens such that the formula changes in this pattern when the drop-down is used:

=SUM(INDEX(B4:D7,1,0))

=SUM(INDEX(B5:D8,1,0))

=SUM(INDEX(B6:D9,1,0))

=SUM(INDEX(B7:D10,1,0))

After the INDEX function returns the values in the row of the range, the SUM function adds the values and the result is displayed.

Note

If we want to sum columns rather than rows, we will alter the position of the zero and one in the formula.

The formula becomes:

=SUM(INDEX(B4:D7,0,1))

Instant Connection to an Expert through our Excelchat Service

Most of the time, the problem you will need to solve will be more complex than a simple application of a formula or function. If you want to save hours of research and frustration, try our live Excelchat service! Our Excel Experts are available 24/7 to answer any Excel question you may have. We guarantee a connection within 30 seconds and a customized solution within 20 minutes.

Did this post not answer your question? Get a solution from connecting with the expert.

Another blog reader asked this question today on Excelchat:
Here are some problems that our users have asked and received explanations on

I have a problem regarding to Sum range with INDEX
Solved by G. S. in 19 mins
need help with this sum index match formula
Solved by V. U. in 17 mins
index and sum multiple columns
Solved by C. D. in 26 mins

Leave a Comment

avatar