Excel AREAS Function

Syntax

=AREAS(reference)

What is the AREAS function?

The AREAS function in Excel is a reference function that returns the number of separate areas (independent cells or cell ranges) within a reference. Its Turkish name is ALANSAY, and it is used in dynamic formulas, macros, and complex range definitions to verify how many distinct parts a reference contains.

In Excel, a cell range is usually defined as a single contiguous block like A1:B10. However, by enclosing multiple ranges in parentheses and separating them with commas (or semicolons in some locales), you can create multi-area references like (A1:B10,D1:E10,G1:H10). The AREAS function quickly tells you how many independent areas such a reference contains.

AREAS Syntax

=AREAS(reference)

  • reference: (Required) A reference containing one or more cell ranges. When using multiple areas, the OUTER parentheses are mandatory: =AREAS((A1:B5,D1:E5))

The function always returns an integer: 1 (single area), 2 (two areas), N (N areas).

What AREAS Does — Practical Use Cases

1. Validating Complex Named Ranges

A named range called "DataRegions" in Excel may consist of multiple independent parts (for example, monthly data blocks). With AREAS you can verify how many distinct blocks the named range holds: =AREAS(DataRegions) returning 12 means 12 monthly data blocks exist.

2. Dynamic Table Merge Validation

When working with merged worksheet data, AREAS helps you test data consistency. If a user accidentally deletes a block, the AREAS result drops below the expected count and you catch the issue early.

3. Macro and VBA Integration

In VBA macros, the equivalent of AREAS is the .Areas.Count property of a Range object. Through formulas, AREAS gives you the same control at the worksheet level — useful when you want logic to react to multi-region inputs without writing VBA.

4. Data Validation Scenarios

A user may pass multi-area references to INDEX or other reference-aware functions. If the expected number of areas is, say, 3 (three sales regions), =IF(AREAS(reference)=3,"OK","Missing region") validates the input upfront.

5. Educational and Teaching Purposes

AREAS is ideal for teaching the difference between "single range" and "multi-range" concepts. =AREAS(A1:B10) returns 1, while =AREAS((A1:B10,D1:E10)) returns 2 — a clean illustration of reference structure.

Advanced Usage Techniques

Combining with Named Ranges

If you create a named range called "RegionalSales" and assign it =A1:B10,D1:E10,G1:H10, then writing =AREAS(RegionalSales) in any cell returns 3. This is fundamental for analyzing combined regions in dashboards.

Error Handling with Health Checks

When you don't know whether a reference is multi-area or single, wrap it: =IFERROR(AREAS(reference),0). Invalid references return 0 instead of breaking the calculation chain.

Combining with Other Functions

Pair AREAS with ROWS or COLUMNS to estimate the total cell count of a multi-area reference. For example, =AREAS(reference)*ROWS(reference)*COLUMNS(reference) approximates the total cells (assuming each block is the same size).

Common Mistakes and How to Fix Them

The most frequent error is forgetting the outer parentheses for multi-area references. Writing =AREAS(A1:B10,D1:E10) makes Excel treat the second range as a separate function argument, raising a #VALUE! error. The correct syntax is =AREAS((A1:B10,D1:E10)). Also, AREAS cannot count regions across different worksheets — it only counts areas within the same sheet reference.

Performance and Version Compatibility

AREAS works in Excel 2003 and all later versions, Microsoft 365, Excel for Web, and Excel for Mac. It is extremely fast because it only counts the regions in the reference — it never inspects the actual cell contents. Even on large multi-area references with thousands of cells, performance is unaffected.

Related Functions

  • ROWS: Returns the number of rows in a range.
  • COLUMNS: Returns the number of columns in a range.
  • INDEX: Can use the area number argument with multi-area references.
  • INDIRECT: Converts text to actual range references.

Conclusion

AREAS is a small but powerful helper. Anywhere you work with multi-area references — named ranges, merged regions, dynamic reports — it tells you the area count instantly. As a validation tool for data quality, macro integration, and complex formulas, it is indispensable. It takes a single parameter, returns a single number; but used correctly, it dramatically improves the reliability of your spreadsheets.

Examples

# Title Formula Result
1 Tek aralık =ALANSAY(A1:B10) 1
2 İki aralık =ALANSAY((A1:B10;D1:E10)) 2
3 Üç aralık =ALANSAY((A1:A5;C1:C5;E1:E5)) 3
4 Tek hücre =ALANSAY(A1) 1
5 Adlı aralık =ALANSAY(BölgeselSatışlar) 3
6 EĞERHATA ile =EĞERHATA(ALANSAY(başvuru);0) 0
7 Doğrulama =EĞER(ALANSAY((A1:A5;B1:B5))=2;"OK";"HATA") OK
8 Dört aralık =ALANSAY((A1:A2;C1:C2;E1:E2;G1:G2)) 4

Common Errors

#DEĞER!
Cause: Çoklu alan dış parantez olmadan yazıldı
Solution:
#BAŞV!
Cause: Silinmiş bir hücre/aralık başvurusu
Solution:
#AD?
Cause: Tanımsız adlandırılmış aralık
Solution:
Beklenmedik 1 sonucu
Cause: Çoklu alanlar virgülle değil noktalı virgülle ayrılmadı
Solution:

Frequently Asked Questions

ALANSAY fonksiyonu ne döndürür?
Bir başvuruda bulunan ayrı (bağımsız) aralık sayısını tam sayı olarak döndürür.
Çoklu aralık nasıl yazılır?
Aralıkları noktalı virgülle (Türkçe) veya virgülle (İngilizce) ayırın ve TÜMÜNÜ dış parantez içine alın: <code>(A1:A5;C1:C5)</code>.
Farklı sayfalardaki bölgeleri sayabilir mi?
Hayır, ALANSAY sadece aynı çalışma sayfası içindeki çoklu alanları sayar.
Tek hücre kaç alan sayılır?
Tek hücre de bir alan sayılır; ALANSAY 1 döner.
Hangi Excel sürümlerinde çalışır?
Excel 2003 ve sonrası, Microsoft 365, Excel for Web ve Excel for Mac.
Performansı yavaş mı?
Hayır, ALANSAY hücre içeriklerine bakmaz, sadece bölge sayısını sayar — çok hızlıdır.
Example Excel File
AREAS.xlsx · 12.5 KB

Enter your email to receive the example Excel file (link valid 24h).

Become a supporter — download instantly, no email

Related Functions