ISBLANK formula example # 3: SUMIF Function
The image below shows a list of grocery items.
For some grocery items, we have the batch number next to them. Whereas, the others don’t have any.
Can we sum only those items whose batch numbers are mentioned?
1. Write the SUMIF function as follows.
The first argument defines the range for the criteria to be checked. We want the batch numbers, so the list of batch numbers (B2:B6) is referred to here.
2. Write the next argument as below.
=SUMIF (B2:B6, “<>”
The sign “<>” defines non-blank cells. This means the range B2:B6 must be checked for non-blank cells. And only non-blank cells should be summed.
3. Define the range to be summed.
=SUMIF (B2:B6, “<>”, C2:C6)
We have created a reference to cell C2:C6 as these cells contain the prices. And we want the prices to be summed.
4. Hit ‘Enter’ to see the formula applied.
Excel has summed the prices of some grocery items only.
It has only summed the prices of the grocery items for which a batch number is present. These include Cell C2, C3, and C6.
Double-check: Apply the SUM function to add these cells up or do some quick math.
20 + 15 + 50 = 85