Yes, you can combine VLOOKUP and SUMIF. In SUMIF, there is a criteria argument in which you can use VLOOKUP to create a dynamic value. This will allow you to change the criteria by changing the lookup value in the VLOOKUP. The use of this combo formula is unique.
In this tutorial, we will learn to combine SUMIF and VLOOKUP to create a formula.
Combine SUMIF and VLOOKUP
- First, in a cell enter “=SUMIF(“, for the range argument, refer to the product ID range that you have in table1.
- After that, in the second augment, you need to use the VLOOKUP function to lookup for the product ID by using the product name from the cell above.
- Next, in the third argument of the SUMIF, refer to the quantity column to use as a sum_range.
- In the end, enter the closing parentheses and hit enter to get the result.
How this Formula Works
Let’s break this formula into three parts: In the first part, you have specified the range where you have the product ID.
In the second part, you have the VLOOKUP that takes the product name from cell B15 and lookup it in the table2. For Headphones, we have the Product ID OT-356.
In the third part, we have the quantity column as sum_range.
In short, VLOOKUP helps you find the Product ID with the Product Name and then SUMIF takes that Product ID and looks it up in the Product ID column, and then sums values from the Quantity column.
As I said, when you use SUMIF and VLOOKUP, this makes your formula a dynamic formula. When you change the product name in the cells it changes the result.
SUMIF and VLOOKUP in Multiple Sheets
You can use this combination even when you have both tables in multiple sheets differently.
In the above example, you have the product name table on a different sheet.
Get the Excel FileDownload
- Sum Greater than Values using SUMIF
- Sum Not Equal Values (SUMIFS) in Excel
- SUMIF / SUMIFS with an OR Logic in Excel
- SUMIF with Wildcard Characters in Excel
- SUMIFS Date Range (Sum Values Between Two Dates Array)
- Sum IF Cell Contains a Specific Text (SUMIF Partial Text)
- Sum Values Based on Year (SUMIF Year)
- SUMIF By Date (Sum Values Based on a Date)
- SUMIF Non-Blank (Sum Values for Non-Empty Cells)
- Use SUMIF to Sum Blank Values or Empty Cells
- Sum Values Less Than a Particular Value (SUMIF Less Than)
- Sum Values that are Greater Than Zero (SUMIF)
- Sum Values Based on the Month (SUMIF)
⇠ Back to Top Excel Formulas List