In this article, we will learn How to use the SUMIF function in Excel.
What is the SUMIF function ?
In Excel we calculate the sum having given criteria. For Example finding the sum of salaries which are greater than 50k or finding the sum of scores obtained by Jackie in Exams. This is usually a useful function when the given criteria is only one. Criteria range can be the same as sum range or can be different depending upon the situation.
SUMIF Function in Excel
All of these might be confusing to understand. Let's understand how to use the function using an example. Here we will try out the SUMIF function. As the name suggests, the SUMIF formula in Excel sums values in a range on a given condition.
Generic Excel SUMIF Formula:
Let's jump into an example. But theory…, Ah! We will cover it later.
For this example I have prepared this data.
Based on this data we need to answer these questions:
Let's start with the first question.
We need to tell the sum of the price won by Ravi.
So our condition range will be name range and that is A2:A10.
Our condition is Ravi and
Sum range is E2:E10.
So in cell I2 we will write:
Note that ravi is in double quotes. Text conditions are always written in double quotes. This is not the case with numbers.
Note that ravi is written in all smalls. Since SUMIF is not case sensitive, hence it doesn’t matter.
The above SUMIF formula will return 31907 as shown in the image below.
For the second question, our condition range will be D2:D10.
Condition is >70 and
The sum range is the same as before.
The above SUMIF formula will return 103973 as shown in the image below.
In the third question, our condition is Delhi. But we don’t have a city column. Hmmm… So what do we have? Aha! City code. This will work.
We know that all Delhi city codes start from 1100. City codes are in 6 digits. So we know it is 1100??. “?” operator is used when we know number of characters but don’t know the character. As here we know that there are two more numbers after 1100. They can be anything, so we used “?”. If didn’t know the number of characters, we would use “*”.
Remember wild card operators only work with text values. Hence you need to convert city code into text.
You can concatenate numbers with “” to make them text value.
|(formula to convert number into text) = number & “” or =CONCATENATE(number,””)|
Now in cell I2 write this formula
This will return the sum of the price whose city code starts with 1100. In our example it is 79836.
Here are all the observational notes when error is given SUMIF function in Excel
Hope this article about How to use the SUMIF function in Excel is explanatory. Find more articles on calculating values and related Excel formulas here. If you liked our blogs, share it with your friends on Facebook. And also you can follow us on Twitter and Facebook. We would love to hear from you, do let us know how we can improve, complement or innovate our work and make it better for you. Write to us at email@example.com.
Related Articles :
How to use the SUMPRODUCT function in Excel: Returns the SUM after multiplication of values in multiple arrays in excel.
SUM if date is between : Returns the SUM of values between given dates or period in excel.
Sum if date is greater than given date: Returns the SUM of values after the given date or period in excel.
2 Ways to Sum by Month in Excel: Returns the SUM of values within a given specific month in excel.
How to Sum Multiple Columns with Condition: Returns the SUM of values across multiple columns having condition in excel
How to use wildcards in excel : Count cells matching phrases using the wildcards in excel
Popular Articles :
How to use the IF Function in Excel : The IF statement in Excel checks the condition and returns a specific value if the condition is TRUE or returns another specific value if FALSE.
How to use the VLOOKUP Function in Excel : This is one of the most used and popular functions of excel that is used to lookup value from different ranges and sheets.
How to use the SUMIF Function in Excel : This is another dashboard essential function. This helps you sum up values on specific conditions.
How to use the COUNTIF Function in Excel : Count values with conditions using this amazing function. You don't need to filter your data to count specific values. Countif function is essential to prepare your dashboard.
The applications/code on this site are distributed as is and without warranties or liability. In no event shall the owner of the copyrights, or the authors of the applications/code be liable for any loss of profit, any problems or any damage resulting from the use or evaluation of the applications/code.