FormulaCraft

How to average with a condition in Excel and Google Sheets

Topic:AVERAGE & central tendency
Excel & Google Sheets
=AVERAGEIF(A2:A6,"North",B2:B6)

Verified example

Computed by a real spreadsheet engine on the sample data below.

RegionSales
North80
South50
North90
East60
North70

=AVERAGEIF(A2:A6,"North",B2:B6)80

Try it with your data

Edit the grid or formula, then run it through a real spreadsheet engine — no signup.

Sample data — click any cell to edit

Runs server-side · free · no signup

Step by step

  1. 1Select the output cell.
  2. 2Type =AVERAGEIF(.
  3. 3Enter the criteria range (the column to test), e.g. A2:A6.
  4. 4Enter the criterion, e.g. "North".
  5. 5Enter the average range (the column to average), e.g. B2:B6, then close the parenthesis and press Enter.

Tips

Need it for your exact data?

Describe your columns in plain English and get the precise formula for your sheet, with the right Excel or Sheets syntax.

Frequently asked

What is the difference between AVERAGEIF and AVERAGEIFS?

AVERAGEIF supports one condition. AVERAGEIFS supports multiple conditions (AND logic) and has a different argument order: average_range comes first.

Can I use wildcards with AVERAGEIF?

Yes. =AVERAGEIF(A2:A6,"No*",B2:B6) averages values where column A starts with 'No'.

More on AVERAGE & central tendency

See all →

Formulas used

Written and reviewed by FormulaCraft Team. Each formula on this page is run through our verification engine before publishing.

Last reviewed: