Excel is a spreadsheet program from Microsoft which organizes numbers and data using different functions and formulae.
One of the most useful functions you should learn about is the SUMIF function. SUMIF is used to sum any value in a range while meeting the criteria that you specify.
You can use it in a wide variety of situations. Therefore, if you want to know how to use the SUMIF function in Excel properly, just keep reading.

What Is the SUMIF Function?
The SUMIF function in Microsoft Excel is designed to add a range of numbers when considering your criteria. It is a built-in Math and Trigonometry function in Excel.
You can enter the SUMIF function as a part of a formula in the cell of your worksheet. For example, if you have a column of numbers, and you wish to sum only the ones that have a value larger than 7… then you can use this formula:
=SUMIF(A2:A11,">7")

On the other hand, if you want to sum only the values of one column in which the cells match the criteria you specified, this formula would look something like this:
=SUMIF(A2:A11, "April", B2:B11).
This function will only sum the values in the range of B2:B5, where the A2:A5 equals “April”; you can see it in the picture below.

Knowing the Syntax Is Important
range
To write the function correctly, you need to specify the range. This indicates the range of cells that you want to evaluate by a particular criterion.
You can type numbers, arrays, names, or references to cells in these ranges as long as they contain data values. Cells that you leave blank or that have text values are ignored. The range you select can include dates in the basic Excel format.
criteria
As you write the function, it's important to specify the criteria. You can enter the function criteria as a number, cell reference, expression, function, or text that specifies which cells are added.
Additionally, you can specify wildcard characters such as an asterisk (*) that matches any character sequence and a question mark (?) that matches any single character.
sum_range
In writing the function, it is not necessary to specify the sum_range. This is an array of numeric values or cells that are numeric in value, which are added together when considering whether the range entry satisfied the supplied criteria.
In the absence of a sum_range argument, the values from the range argument are summed instead. The sum_range needs to have the same size and shape as the range.
If you do it any other way, the outcome of the formula is not going to be correct. Your formula will then sum a range of cells starting from the first cell of your sum_range but is of the same dimensions as your range.
Excel SUMIF Function: Explained
The most important thing is for you to understand how the syntax works. If you follow the careful explanation above, you should get the gist of how everything works.
In case you still have some issues, there are many good examples on the official Microsoft website, or just check out this simple excel SUMIF example below.

The SUMIF function is categorized as the Math and Trigonometry function in Excel. Based on the criteria that you specified, it will sum up the cells that match specific criteria. These criteria can be based on numbers, dates, and text.
Considering that the SUMIF function in Microsoft Excel is just one of the more basic formulas out there, it might be a good idea to learn more about it if you are planning to use Excel in the future.