Tom’s Tutorials For Excel: COUNTIF and SUMIF Anything or Nothing
You can use the “<>” and “=” operators with worksheet functions for identifying the presence or absence of values in a cell.
In Picture #1, the formula in cell E4 is
The number 6 is returned because 6 items appear in range A2:A10.
In Picture #3, the formula in cell E8 is
The dollar figure $51,249 is returned as the sum of cells B2, B3, B5, B7, B9, and B10, corresponding to the presence of values in cells A2, A3, A5, A7, A9, and A10.
In Picture #4, the formula in cell E9 is
The dollar figure 14,825 is returned as the sum of cells B4, B6, and B8 because no values are present in cells A4, A6, and A8.