Documentation/Calc Functions/AREAS

Other languages:
English • ‎Nederlands

AREAS

Summary:

Determines the number of individual areas in a given reference. A reference may comprise one or more areas, where each area comprises a single cell or a block of contiguous cells.

AREAS(Reference)

Returns:

Returns a positive integer that is the number of areas within the supplied reference.

Arguments:

Reference is the reference to be analyzed.

• Single references take the form of a specific cell reference (for example, "$Sheet1.A1"), a specific cell range (for example, "$Sheet1.$C$28:$H$29"), or the name of a named or database range. AREAS is particularly useful with named ranges defined using Sheet ▸ Named Ranges and Expressions ▸ Define on the Menu bar, because they can be configured to comprise multiple areas by using the tilde reference concatenation operator in the Range or formula expression field of the Define Name dialog.
• Multiple references can be passed as a single argument by providing them in a separated list, surrounded by parentheses – for example, =AREAS((A1:B6; C2:D7; E3:F8)). In this case Calc will reformat your function call to use the tilde reference concatenation operator – for example =AREAS((A1:B6~ C2:D7~ E3:F8)). Alternatively, you can use the tilde reference concatenation operator directly without parentheses – for example =AREAS(A1:B6~C2:D7~E3:F8).
• AREAS counts repeated or overlapping areas as separate entities. For example, =AREAS(A1~A1~A1:C3) returns 3.
• If Reference is not a valid reference list, then AREAS reports a parameter list error (Err:504).

None.

Examples:

Formula Description Returns
=AREAS(A5:B7) Here the function returns 1 to reflect that the argument represents a single area. 1
=AREAS(A1:C6~D4:E7) Here the function returns 2 to reflect that the argument represents two areas. 2
=AREAS(namedRange) where namedRange is a named range defined as $Sheet1.$A$1:$B$7~$Sheet1.$C$12:$D$15~$Sheet1.$E$5:$F$7. Here the function returns 3 to reflect that the argument represents three areas. 3 =AREAS(databaseRange~A16) where databaseRange is a database range defined as$Sheet1.$A$1:$C$3. Here the function returns 2 to reflect that the argument represents two areas. 2
=AREAS((A1:B3; F2; G1)) Here the function accepts the list of references separated by semicolons and enclosed in extra round brackets, returning 3 to reflect that the argument represents three areas. Calc converts the formula to =AREAS((A1:B3~ F2~ G1)) 3
=AREAS(A2:B4 ! B3:D6) Here the supplied reference involves two ranges joined by the reference intersection operator (!), which results in a reference to a single range containing all cells lying in both the left and right references. Here the function returns 1. Note that the formula =AREAS(A2:B4 ! B5:D8) reports a #REF! error because there are no cells that lie in both ranges. 1
=AREAS($Sheet1.A1:$Sheet3.C5) Here the function returns 1. Despite the specified reference including cells from multiple sheets, they are considered contiguous, and AREAS only counts one area. 1

AREAS