The function SUM in Excel is quite useful to add values in a column. But this one is not useful when we have to count the values based on a criteria that should satisfy in another column.
For Example we have a scenario where we have to count items cost that are delivered and undelivered and Grand Total. To get the Grand Total we can use sum function directly. But to count total price which are delivered and undelivered we have to use the sumif function. Look at below screenshots.
To calculate all items Total:
To calculate Items that are delivered:
To calculate Items that are undelivered
This is how it looks finally