Spreadsheet Practice

How to average if another cell is not blank in Excel

Formula (Excel and Google Sheets)

=AVERAGEIFS(C2:C8,B2:B8,"<>")

Use AVERAGEIFS with "<>" as the condition: =AVERAGEIFS(C2:C8,B2:B8,"<>").

Result on the example
8.00 in F1
Works in
Every current version
Google Sheets
Same formula

See it work

The formula is already in F1. Change any input and the result updates, or edit the formula to experiment.

How it works

The condition "<>" means "not empty", so AVERAGEIFS averages only the scores on rows with a completion date. The two unfinished surveys hold a default 0 that would otherwise drag the average down.

=AVERAGEIFS(C2:C8,B2:B8,"<>")

Result8

  1. C2:C87 rows × 1 col: 8, 0, 9, 6, …

    A range: 7 cells in one column.

  2. B2:B87 rows × 1 col: 3/2/2026, (empty), 3/3/2026, 3/5/2026, …

    A range: 7 cells in one column.

  3. AVERAGEIFS(C2:C8,B2:B8,"<>")8

    AVERAGEIFS: Average of values that meet every condition.

    • average_rangeC2:C87 rows × 1 col: 8, 0, 9, 6, …
    • criteria_range1B2:B87 rows × 1 col: 3/2/2026, (empty), 3/3/2026, 3/5/2026, …
    • criteria1"<>"

In Google Sheets

The same formula works in Google Sheets: =AVERAGEIFS(C2:C8,B2:B8,"<>"). We ran it in Google Sheets mode on the same data and it returns 8.00.

Other ways to do it

Each one was run on the same example sheet.

FormulaResultWhen to use it
=AVERAGEIF(B2:B8,"<>",C2:C8)8.00AVERAGEIF gives the same result; the range to average comes last.
=AVERAGE(C2:C8)5.71Different resultThe plain average. Counts the unfinished surveys' zeros: 5.71.

Common mistakes

  • A formula in column B that returns "" still counts as not blank for "<>". Test with =AVERAGE(FILTER(C2:C8,B2:B8<>"")) in that case.
  • If no row has a date, AVERAGEIFS returns #DIV/0!.

Try it yourself

Same data, empty answer cell. Your formula is graded instantly, then re-checked on changed data, so a typed-in number won't pass.

Average if another cell is not blank

In F1, average the scores of the respondents who have a completion date in column B.

Questions

How do I average only where the cell itself is not blank?

AVERAGE already skips blank cells: =AVERAGE(C2:C8). Zeros are counted, though.

How do I add another condition?

Add a pair: =AVERAGEIFS(C2:C8,B2:B8,"<>",C2:C8,">=5").

Checked by running on 2026-10-30: every formula and result on this page was calculated by the Spreadsheet Practice formula engine, in both Excel and Google Sheets modes.