AREAS function returns the number of areas in a reference.

## Syntax

**AREAS(reference)**

## Arguments

reference | The reference for which you want to count the areas. |

## How to use

To use the AREAS function, simply provide a reference as the argument. This function is primarily useful when working with multi-area references, such as when dealing with arrays or multiple ranges. Here are a few examples to illustrate its usage: 1. Count the areas in a single range:

1 |
=AREAS(A1:C3) |

This will return 1 since the reference A1:C3 is a single contiguous range. 2. Count the areas in multiple non-contiguous ranges:

1 |
=AREAS(A1:C3, E1:G3) |

This will return 2 because there are two non-contiguous ranges provided. 3. Count the areas in an array formula:

1 |
=AREAS({A1:C3, E1:G3}) |

This will also return 2 because it recognizes the two distinct ranges within the array. Remember that the AREAS function is particularly helpful when you need to work with complex references and want to know how many distinct areas they contain.