# How to use SUM with INDEX-MATCH Function in Excel

That’s exactly what we will be teaching to you today in this Step-by-Step Tutorial. We have a data set of a Mobile store showing sales of different mobile brands and their specific models. We will be using SUM, INDEX, and MATCH functions to calculate the total sales of some specific models in the past five months.

## SUM FUNCTION

The SUM function is used to add a set of numbers together. It is one of the most fundamental and widely used functions in Excel. The SUM function can add up individual numbers, a range of cells, or a combination of both. Its syntax is very basic:

Syntax =SUM(number1, [number2], …)

## INDEX FUNCTION

In Excel, the INDEX function is used to return the value of a cell in a specified row and column within a range of cells. The INDEX function can be used to create dynamic references, such as retrieving data from a table based on the value in another cell. It is also commonly used in Excel lookups in combination with the MATCH function. Following is the syntax of the INDEX function:

=INDEX(array, row_num, [column_num])

OR

=INDEX(reference, row_num, [column_num], [area_num])

## MATCH FUNCTION

The MATCH function in Excel is used to find out the relative position of a value within a range of cells and returns that position as a row or column number. The function searches the range for the specified value and returns the relative position of the value’s first occurrence. The MATCH function returns an error if the value is not found in the range.

Syntax =MATCH(lookup_value, lookup_array, [match_type])

## Nesting SUM function with INDEX-MATCH function in Excel

The INDEX and MATCH functions can be combined. It works well to extract specific data from a big array. The row and column positions of the input values are what the MATCH function looks for and the INDEX function simply returns the result of the intersection of the row and column positions. The SUM function will then return the sum of the found values. We can also integrate this INDEX-MATCH function into SUM or SUMPRODUCT function as well.

Following is one of the possible criteria;

Where;

data_range:

This is the selected range of data on which you want to perform calculations.

lookup_value:

This function refers to a cell to match values in another row or column against the cell and thereby retrieving the corresponding results from the respective rows and columns. Microsoft Excel is a spreadsheet program that has a lot of functions to perform various data manipulations. Functions are used in Excel to perform different calculations. Excel functions can be combined to perform multiple tasks and calculations in a single formula. This helps to streamline processes and saves time by allowing users to perform multiple operations in a single step.

### Step 1 – Add Look_Up Value – Write the following formula in an appropriate cell

– Enter the lookup_value on which you want to search for in the data range.

– In our case, we’ll use a cell C15 and the formula will look up for any model number entered in cell C15

– So, our formula will become – Now we’ll choose the headers range. This will be the array in which the lookup value will be searched for, which in our case is B2:B12. The model names of all mobiles are in this column. So, write the following in the formula:

=SUM(INDEX(data,MATCH(C15,B2:B12,0),0))

### Step 3 – Select the Data Range – Now, we’ll enter the data_range in the following formula, this will be the range of cells having the data on which the calculations will be performed. In our case, it’s A2:G12.

– Enter the following in the formula
=SUM(INDEX(A2:G12,MATCH(C15,B2:B12,0),0))

### Step 4 – Enter the ‘Model number’ in the cell C15 =SUM(INDEX(A2:G12,MATCH(C15,B2:B12,0),0))

After completing the whole formula, All we have to do is to enter the Model number whose sales you want to calculate in the lookup_value cell ‘C15’.

– Here, I am calculating total sales for the specific model ’note 9’.

– After entering the model number, press the ‘Enter’ button.

– Doing this will calculate total sales of note 9 in the past five months.

As you can see in the above animation, we got the Sum of the total sales of ‘note 9’ in the past five months. This formula =SUM(INDEX(A2:G12,MATCH(C15,B2:B12,0),0)) is generic,

Excel will automatically calculate the total sales of any entered model. I hope you understand how to use the SUM with INDEX and MATCH Functions in Excel.
{"ft_lang_label":"__label__en","ft_lang_prob":0.8297254,"math_prob":0.9673835,"size":4613,"snap":"2023-40-2023-50","text_gpt3_token_len":1059,"char_repetition_ratio":0.14211325,"word_repetition_ratio":0.009222661,"special_character_ratio":0.23065251,"punctuation_ratio":0.11542611,"nsfw_num_words":0,"has_unicode_error":false,"math_prob_llama3":0.99558175,"pos_list":[0,1,2,3,4,5,6,7,8,9,10],"im_url_duplicate_count":[null,1,null,1,null,1,null,1,null,1,null],"WARC_HEADER":"{\"WARC-Type\":\"response\",\"WARC-Date\":\"2023-10-01T16:26:59Z\",\"WARC-Record-ID\":\"<urn:uuid:51acbe16-fe4e-4345-901b-b43ea3b86d2e>\",\"Content-Length\":\"79534\",\"Content-Type\":\"application/http; msgtype=response\",\"WARC-Warcinfo-ID\":\"<urn:uuid:82c8c519-2ad3-4ba2-b232-1410fc4fe7d0>\",\"WARC-Concurrent-To\":\"<urn:uuid:a8e0b507-0756-4730-a4dc-ae328775714c>\",\"WARC-IP-Address\":\"104.16.205.47\",\"WARC-Target-URI\":\"https://spreadcheaters.com/how-to-use-sum-with-index-match-function-in-excel/\",\"WARC-Payload-Digest\":\"sha1:7CXHKUUJQEHXQDQ7JFGM6M2CHT5DPOUZ\",\"WARC-Block-Digest\":\"sha1:7R2UBC4UPJZN7DNHMYMSOBPWYFUJPJBU\",\"WARC-Identified-Payload-Type\":\"text/html\",\"warc_filename\":\"/cc_download/warc_2023/CC-MAIN-2023-40/CC-MAIN-2023-40_segments_1695233510903.85_warc_CC-MAIN-20231001141548-20231001171548-00658.warc.gz\"}"}