Function Problems

How to Use Excel Geography Data Types in COUNTIF Formulas

Adam DavisAdam Davis Nov 13, 2026 868 views

Question details

The user needs to count Excel Geography data type cells with COUNTIF, but the linked data type stores an object rather than the displayed country name.

Using Excel Geography Data Types in COUNTIF Formulas
Product
Microsoft Excel
Device & OS
not provided
Scenario
The user has a country column formatted as Excel Geography data types and wants to count how many times each country appears.
Observed behavior
COUNTIF does not evaluate the displayed country name correctly because the Geography cell is a linked data type, not plain text.
Before you start

Select a Geography data type cell and confirm the linked data type icon is visible. Add an empty helper column next to the Geography column so the displayed country name can be extracted before you apply COUNTIF.

Solution 1Recommended

Extract the Geography Name property into a helper column and use COUNTIF

Use this when you need a reliable COUNTIF result from existing Geography data type cells.

Geography data types are linked records. The cell shows a country name, but the underlying value is not a string, so COUNTIF cannot match it directly. Extracting the .Name property creates plain text that COUNTIF can evaluate.

1
Select a blank helper column

Open the Excel workbook and select the first blank cell next to your Geography data type column, for example C2.

2
Enter the .Name formula

Type =A2.Name in C2, where A2 is the Geography data type cell, and press Enter.

3
Fill the formula down

Drag the fill handle down the helper column to extract the displayed country name for every row.

4
Use COUNTIF on extracted names

Enter =COUNTIF($C$2:$C$100,"United States") or reference a criteria cell, then press Enter.

Extract the Geography Name property into a helper column and use COUNTIF
COUNTIF now returns the expected count: The helper column contains plain text, so COUNTIF, COUNTIFS, and SUMPRODUCT can all use it directly.
Free Microsoft Office alternative

Use WPS Office Spreadsheets for Simpler Country Counting Without Excel Geography Data Type Issues

If Excel Geography linked data types make COUNTIF unreliable, switch to WPS Office Spreadsheets. It opens .xlsx files, handles country names as normal text, and gives you a familiar Excel-like toolbar—free and lightweight.

  1. 1. Download WPS Office: Go to the WPS Office download page and install WPS Spreadsheets on your PC or Mac.
  2. 2. Open your Excel workbook: Launch WPS Spreadsheets and open the .xlsx file that contains your country list.
  3. 3. Use COUNTIF on the country names: Select a blank cell and enter =COUNTIF(range,"United States") using the range that contains your country names in WPS.
Opens and saves .xlsx workbooks while retaining familiar formulas and formattingHandles country names as regular text, so COUNTIF works without extracting a Geography .Name propertyFree, lightweight Office alternative with a familiar Excel-style ribbonNo Microsoft 365 subscription required for everyday spreadsheet counting and summaries
microsoft office alternative - wps office

Frequently Asked Questions

Why does COUNTIF return 0 when I use a Geography data type column?

Because a Geography cell is a linked data type, not a plain text value. Create a helper column with =A2.Name and point COUNTIF to that helper column, or use SUMPRODUCT with the .Name property.

Can I use COUNTIF directly on the Geography column?

Usually not. The cell displays a country name, but COUNTIF sees the underlying linked record. Extract the displayed property into a helper column, then apply COUNTIF to the extracted text.

What formula counts country names without a helper column?

In Microsoft 365 Excel, =SUMPRODUCT(--(country[Country].Name=B2)) can count Geography data types directly, where country[Country] is the Geography column and B2 is the criteria cell.

Will WPS Office open an .xlsx workbook that contains Geography data types?

Yes, WPS Office opens .xlsx files. However, because Geography is an Excel linked data type, the values may appear as text or lose the live link in WPS; for counting tasks, plain text is usually easier to use with COUNTIF.

What is the .Name property in a Geography data type?

It exposes the display field of the linked record, such as the country or place name. In Excel, you can reference it like A2.Name to get the text shown in a Geography cell.