How to Use VLOOKUP to Sum Multiple Rows in Excel
VLOOKUP is a powerful function in Excel that allows you to look up data based on a specific value in a table. However, it's not designed to sum multiple rows directly. To sum multiple rows based on a specific criteria in Excel, you can use a combination of SUMIFS, INDEX, and MATCH functions instead. Here's a step-by-step guide on how to use these functions to sum multiple rows in Excel:
Example:
Let's say you have the following data in Excel:
ID | Product | Sales |
---|---|---|
1 | Apple | 200 |
2 | Banana | 300 |
3 | Orange | 100 |
1 | Apple | 150 |
2 | Banana | 250 |
3 | Orange | 200 |
You want to sum the sales for each product.
- First, create a new table where you want to sum the sales for each product. In this example, create a new table in cells
E1:F4
:Product Total Sales Apple Banana Orange - Click on the cell where you want to display the total sales for the first product (in this example, cell
F2
). - Enter the following formula in the cell:
In this formula,=SUMIFS($C$2:$C$7,$B$2:$B$7,E2)
$C$2:$C$7
is the range of sales data,$B$2:$B$7
is the range of product data, andE2
is the cell containing the product name for which you want to calculate the total sales. - Press Enter to calculate the total sales for the first product.
- Copy the formula down to the other cells in the "Total Sales" column.
Now you have the total sales for each product in the new table using the SUMIFS function.
Did you find this useful?