Example #1 - Use of sumif(vlookup) together to determine some value
This example shows how to use the SUMIF(VLOOKUP) together to find the sum of the sales in the same month in different years.
- The following data is considered for this example, as shown in the screenshot.
- The lookup table considered is shown as mentioned below. In addition, it included reference values for the months from January to December.
- After entering data into the main and lookup tables, the SUMIF function determines the total sales generated in other months. Here, the Lookup value considered is the month. The formula combining the SUMIF(VLOOKUP) is shown as:
The total sales in January month are determined as 17263.3. When we change the lookup value to another month, the respective total sales are generated.
Example #2 - Determining Sum Based on Matching Criteria in Different Work Sheets
In this example, the lookup table and main table are taken in different sheets rather than a single sheet. As a result, the lookup table data is shown in the below screenshot.
The main table data is shown in the below screenshot.
The salesperson's name is taken as a lookup value for determining the total sales, and employee IDs are used for reference purposes. The formula is entered as presented below, and few changes are observed to the formula compared to the first example.
In this example, instead of selecting a lookup array, only lookup_table is mentioned. By pressing the three keys, including "CTRL," "SHIFT," and "ENTER," accurate results are produced.
When the salesperson's name is changed to names mentioned in the lookup, the sum of sales is varied and produces a new result.