To get the sum of all numbers, you can use the SUM function. If you need to get the sum of the numbers that are less than or equal to a number, please use the SUMIF function.
Example: You are working with data that includes the employee's gender, age, and salaries, and you need to get the sum of the salaries that are less than or Equal to $90,000.
The employee's gender is in column A, the age is in column B, and the employees' salaries are in column C.
Formula 1: To get total salaries less than or equal to $90,000, please use the following formula:
= SUMIF(C2:C11,"<=90000")
The result returns $496,000.00
Formula 2: To get the total salaries for those less than or equal to 30 years old, please use the following formula:
= SUMIF(B2:B11,"<=30",C2:C11)
The result returns $284,000.00
Formula 3: To get the total salaries for those less than or equal to cell C6, please use the following formula:
= SUMIF(C2:C11,"<="&C6)
The result returns $319,000.00
Notes: The SUMIF function
The SUMIF function adds all the numbers with the criteria you specified.
Formula:
=SUMIF(range, criteria, [sum_range])
Explanations:
– The range is required, which is the criteria range.
– The criterion is required, the criteria for the sum.
– Sum_range is optional, the cells to add together.