Excel function

AREASfunction

Counts the number of separate areas in a reference.

All versions
=AREAS((A2:A4,C2:C4))
A
B
C
D
1
2
3
4
5
6
7
8
9

Click a cell to change reference. Add ",D2:D9" to the reference. A single range gives 1. Try breaking it on purpose to see the errors.

Result

2

reference

A cell or range reference. Join several ranges with commas and wrap them in parentheses.

What is the AREAS function?

=AREAS(reference)

AREAS counts how many separate areas (blocks of cells) a reference contains. It counts blocks, not cells.

Join several areas with commas and wrap the whole thing in parentheses. Watch each area highlighted on the sheet above.

Arguments

reference
A cell or range reference. Wrap several areas in parentheses, like (A2:A4,C2:C4).

AREAS examples

  1. Example 1. Two areas

    =AREAS((A2:A4,C2:C4))

    2.

  2. Example 2. One range

    =AREAS(B2:D9)

    Many cells, but one block, so 1.

  3. Example 3. A named range

    =AREAS(SalesRegions)

    Counts the areas the name refers to.

Common mistakes

FAQ

When is it used?
To check how many areas a named range has, or when working with the area number of INDEX.
What about the intersection (space operator)?
An intersection joined with a space, like (B2:D4 C3:C9), is one area.