# How to sum if a cell is not blank in Excel

Use "<>" (not equal to nothing) as the condition: `=SUMIFS(B2:B8,C2:C8,"<>")` adds the rows where column C has something in it.

**Excel:** `=SUMIFS(B2:B8,C2:C8,"<>")` (Every current version)

**Google Sheets:** the same formula works.

## Example

Sample data (row 1 is the header):

| A | B | C | D | E |
| --- | --- | --- | --- | --- |
| Employee | Hours | Approved by |  | Approved hours |
| Ana | 38.5 | M. Ruiz |  |  |
| Ben | 41 |  |  |  |
| Cara | 36 | M. Ruiz |  |  |
| Dev | 40 | K. Shah |  |  |
| Eli | 22.5 |  |  |  |
| Fay | 39.25 | K. Shah |  |  |
| Gus | 40 |  |  |  |

Formula in F1: `=SUMIFS(B2:B8,C2:C8,"<>")`

Result: 153.75

## How it works

The condition `"<>"` means "not equal to empty", so SUMIFS adds the hours on rows where `C2:C8` holds a name. Rows with no approver are skipped. SUMIFS puts the range to add first, so you can add more conditions after it.

## Other ways

- `=SUMIF(C2:C8,"<>",B2:B8)`: SUMIF gives the same result; note the range to add comes last.
- `=SUMPRODUCT((C2:C8<>"")*B2:B8)`: Also skips cells whose formula returns "", which "<>" counts as filled.

## Common mistakes

- A cell with a space, or a formula that returns "", looks empty but counts as not blank for `"<>"`. Use the SUMPRODUCT version, or clean the column.
- Putting the condition on the hours column (`=SUMIF(B2:B8,"<>")`) adds all the hours. Test the column that is blank or filled.

## Questions

**How do I sum if a cell is blank?**

Use "" as the condition: `=SUMIFS(B2:B8,C2:C8,"")`.

**How do I add another condition, like a minimum?**

Add a pair: `=SUMIFS(B2:B8,C2:C8,"<>",B2:B8,">=40")`.

Every formula and result on this page was checked by running it in the Spreadsheet Practice formula engine on 2026-10-30.

Source: https://spreadsheetpractice.com/formulas/sum-if-not-blank
