To remove the count from the state column in Excel, you need to delete the COUNTIF formula (or similar aggregation) that is generating the numbers. If the count appears as part of a pivot table, remove the field from the Values area. The exact steps depend on how the count was created, so the sections below cover the three most common scenarios.
Why Does a Count Appear in the State Column?
A count in a state column usually comes from one of three sources: a formula you entered, a pivot table field, or a data import that appended totals. In a plain spreadsheet, the state column should only contain text values like “CA” or “Texas.” If you see numbers next to each state, a formula such as =COUNTIF(A:A,A2) may have been dragged down, or a pivot table is summarizing the data.
Understanding the source matters because deleting the wrong cell can break other calculations. For example, if the count is part of a summary table, removing it might leave blank cells that mess up sorting. Always check the formula bar when you select a cell with a number—if it shows a formula, that’s what you need to remove.
Method 1: Remove a COUNTIF Formula from a Regular Column
If your state column has a formula like =COUNTIF($A$2:$A$100, A2) in each row, the numbers are calculated dynamically. To remove them:
- Select the range of cells containing the counts (e.g., C2:C100).
- Press Delete on your keyboard. This clears the contents, leaving the cells empty.
- If the formula was in a column adjacent to your data, you can also right-click the column header and choose Clear Contents.
If you want to keep the counts but turn them into static values (so they don’t change when the data changes), copy the cells, then right-click and choose Paste Special > Values. That replaces formulas with numbers, but it still leaves the numbers in the column—so only use that if you actually want the counts elsewhere.
Method 2: Remove a Count from a Pivot Table
Pivot tables often add a “Count of State” field automatically when you drag a text column into the Values area. To remove it:
- Click anywhere inside the pivot table to activate the PivotTable Analyze tab (on Mac, it’s under the PivotTable tab).
- In the Field List pane on the right, find the field labeled “Count of State” (or similar) in the Values area.
- Click the field and choose Remove Field, or drag it back to the field list.
If you don’t see the Field List, right-click the pivot table and select Show Field List. Removing the field will delete the count column from the pivot table, leaving only the state names.
Method 3: Remove a Subtotal or Grand Total Row
Sometimes the “count” appears as a subtotal row below each group of states, or as a grand total at the bottom. This happens when you use the Subtotal feature (Data > Outline > Subtotal) or when a pivot table has totals enabled.
- For Subtotal feature: Go to Data > Outline > Subtotal and click Remove All.
- For pivot table totals: Right-click the pivot table, choose PivotTable Options, go to the Totals & Filters tab, and uncheck Show grand totals for rows and Show grand totals for columns.
If the subtotal rows are just regular cells, select them and press Delete. Be careful not to delete actual state data.
Common Problems and Pitfalls
One frequent issue is that deleting a formula column shifts your data layout. If your state column is column A and the count is in column B, deleting column B entirely will move column C into B, which might break other formulas that reference C. Instead of deleting the column, clear the contents only.
Another problem: if the count is part of a table (Insert > Table), clearing cells might leave the table structure intact but with empty cells. That’s fine, but if you later sort the table, the empty cells will go to the bottom—which might be unexpected.
Also, if the count was generated by a COUNTIF formula that references a range, removing the formula doesn’t affect the original data. The counts will simply disappear, and any other formulas that depended on those counts will show errors. Check for dependent cells before deleting.
How to Prevent Counts from Appearing in the Future
To avoid accidentally adding counts, always check the formula bar before typing numbers into a column that should contain text. If you’re using a pivot table, drag only the state field to the Rows area, not the Values area. If you need a count, put it in a separate column clearly labeled.
For imported data, use Data > Text to Columns to split combined columns, or use Power Query to transform data before loading it—this prevents Excel from auto-summarizing text columns.
Frequently Asked Questions
Why does Excel automatically add “Count of” in a pivot table?
Excel defaults to counting text fields when you add them to the Values area because you can’t sum text. If you want a different aggregation, like average or max, you need to change the field settings—but for text, count is the only option.
Can I remove the count without deleting the formula?
Yes. You can hide the column with the count by right-clicking the column header and choosing Hide. The formula stays intact, but the numbers are not visible. This is useful if you need the counts for other calculations.
What if the count is in the state column itself, not a separate column?
If your state column contains both text and numbers (e.g., “CA” and “5”), you need to filter out the numbers. Select the column, go to Data > Filter, then use the dropdown to uncheck “Select All” and check only the text values. Copy the visible cells to a new column, then delete the original.
Does clearing the count affect my data validation?
No, data validation rules are separate from cell contents. If you have a dropdown list in the state column, clearing the count cells (which are in a different column) won’t affect the validation.
Can I use a formula to remove counts automatically?
If you want to keep only text values and discard numbers, you can use a formula like =IF(ISNUMBER(A2), "", A2) in a helper column, then copy and paste as values. But this is more complex than simply deleting the count column.
Alternatives to Removing the Count
Instead of removing the count, you could move it to a separate summary sheet. For example, use COUNTIF in a new worksheet to list each state and its count, leaving the main sheet clean. Or use a pivot table on a separate sheet to analyze counts without cluttering the original data.
If the count is part of a dashboard, consider using a chart instead of a column of numbers. A bar chart showing state counts is often clearer and doesn’t require a numeric column in the source data.
Related
- Remove Blank Rows in Excel: 4 Fast Methods
- KPI Spreadsheet Setup: Step-by-Step Guide
- Shortcut to Lock Computer: Windows & Mac Keys
Try it: the Date Difference Calculator: days, months, years and weekdays between two dates, with the DATEDIF formulas.
More in How-to basics
- Google Sheets British Date Format: Set Dates to DD/MM/YYYYTo use British date format in Google Sheets, set the spreadsheet’s locale to United Kingdom under File >…
- How to Create a Group Email Template in Microsoft OutlookTo create a reusable group email in classic Outlook for Windows, draft the message, add the group to…
- Excel Double-Click Cell Shortcut: Use F2 to Edit CellsIn Excel for Microsoft 365 on Windows, double-click a cell to edit it in place; the keyboard equivalent…
- Excel and Access Training: What You Actually NeedExcel and Access training means learning how to use Microsoft Excel for data analysis, calculations, and charting, and…
- Create Auto-Delete Rules in Outlook: A Practical GuideTo create an auto-delete rule in Outlook, open Settings > Mail > Rules in new Outlook or Outlook…
- Excel Column Limit: What XFD Means and How It WorksMicrosoft Excel allows 16,384 columns in a worksheet, running from column A to column XFD. This limit applies…
Sources: Function behaviour and menu paths: Microsoft Support documentation for Excel. Method & sources
Spotted an error in this guide? Let us know.