Next, I'll show you how to use the areas function.
function syntax: AREAS (Reference).
function function: Returns the number of areas contained in a parameter reference.
Parameter description: Reference is a reference to a cell or range of cells, or it can refer to multiple regions.
The formula "=areas (A2:B4)" returns 1,
=areas ((A1:A3,A4:A6,B4:B7,A16:A18)) returns 4.
Function result Description
Number of areas contained in the =areas (C2:D4) 1 reference
Number of areas contained in =areas ((C2:D4,E5,F6:I9)) 3 references
Number of areas contained in =areas (C2:d4 C2) 1 references
Note: If you need to specify several references as one argument, you must enclose them in parentheses to prevent Excel from using commas as delimiters between arguments.