SUMIF With VLOOKUP

Last Updated :

11 May, 2019

Blog Author :

Edited by :

Reviewed by :

Table Of Contents

arrow

Combined Use of sumif(vlookup)

The SUMIF with VLOOKUP is a combination of two different conditional functions. The SUMIF function is used to sum the cells based on some condition which takes arguments of the range with the data and then the criteria or the condition and cells to add. Instead of the criteria, we can use the VLOOKUP as the criteria when there is a large amount of data available in multiple columns.

For example, suppose we have a dataset and want to sum values according to conditions. Still, you also have to look up another table to get the correct criteria value. In such a scenario, we can combine the SUMIF and VLOOKUP functions in one formula.

The SUMIF is a function presented in Excel from the 2007 version presented in Excel to sum the various values that match the criteria. The VLOOKUP function is one of the best formulas to gather data from other tables. When multiple conditions and columns exist, SUMIF(VLOOKUP) is used to perform numerous calculations on the Excel sheet. The disadvantage of the SUMIF function returning the only number is overcome using VLOOKUP. The VLOOKUP function helps to return any data from a table based on the matched criteria.

SUMIF-With-VLOOKUP

Explanation

SUMIF Function: It is a Math and Trigonometry function to sum the values when the established condition is "TRUE." The sum value is obtained based on only one criterion.

When we deal with the SUMIF function in Excel, the following formula is used:

SUMIF Formula

  • Range: It is the range of the cells used to assess the established criteria.
  • Criteria: It is the condition to sum the values. It may be a cell reference, number, and another Excel function. For example, when we want to combine SUMIF and VLOOKUP, it will enter the VLOOKUP function in the place of the criteria.
  • Sum_range: The range of cells specified to sum the numerical values.

Now, the formula is modified to

Formula = SUMIF (Range, Vlookup (lookup_value, table_array, column _index _number, ), )

  • Lookup_value: It specifies the value to be searched in a table. It may be a reference or value.
  • Table_array: It is the range of the table containing two or more two columns.
  • Column_index_number: The relative index of a column specifies for returning required data from a specific column.
  • : It can be 0 or 1 to specify whether it should return the exact or approximate value. But, it is optional to a user. 0 indicates an exact match, and 1 shows an approximate match.

How to Use SUMIF with VLOOKUP Function?

The combined use of SUMIF(VLOOKUP) is helpful in searching data based on a single criterion. Excel uses these in many ways to perform the calculations by searching for data. These are collectively used in the business environment to perform various tasks to make good decisions. To use these functions effectively together,

First, the SUMIF function is to be entered utilizing the two methods.

First Method: The formula must type from the keyboard, as shown in the image below.

SUMIF Formula

Second Method: The SUMIF function can be inserted from the "Formulas" tab as shown in the image.

Sumif-with-vlookup-Formula

After entering the SUMIF function, the formula for VLOOKUP is entered inside the SUMIF function by replacing the "Criteria" element. All the parameters of the VLOOKUP, including the lookup value, table array, index number of the column, and range lookup. These are to be enclosed in parenthesis to avoid errors with the formula. The values to be summed are included in the sum range elements of the SUMIF function. At last, "CTRL," "SHIFT," and "ENTER" keys are pressed together to facilitate the values as an array.

Benefits

The following are the benefits of using these functions:

  • We can easily extract the values from another table to perform calculations.
  • Determining the sum of values presented in a range that meets the criteria mentioned in different aspects of a business.

Things to Remember

  • While using the VLOOKUP function, the column index number should not be lower than 1 to avoid errors.
  • We should give indexes to the lookup table columns by indicating numbers 1, 2, 3, and so on.
  • The CTRL+SHIFT+ENTER in excel should be used instead of entering the key since the VLOOKUP function is entered as an array formula.
  • Defining two tables, including main and lookup, is required to extract values and determine the sum of the array values.
  • The SUMIF function provides accurate results for only numerical data. It would not work for another kind of data.