Sub topic 5
Setting column types
This chapter covers what a column type is, how to set one on a table column, and what each type changes about the cells in that column. It also covers how types affect sorting, filtering, and formulas. It assumes you can already convert a range to a table and recognize the header row and column headers. It also assumes you can write simple formulas such as SUM with A1 references.
What a column type does
A column type is a rule attached to a whole table column. In a plain range, each cell stands alone. You can type text in one cell, a date in the next, and a checkbox below that. In a table, the column carries a declared type, and every cell in the column follows it, including cells in rows you add later.
A type does three jobs:
- It controls how you enter values. A checkbox column shows clickable boxes. A dropdown column offers a list of choices. A date column offers a date picker.
- It controls how values display, such as alignment, date format, and chip colors.
- It tells Sheets how to treat the values when you sort, filter, and group.
A type does not change the formula engine. Underneath, a checkbox is still TRUE or FALSE, a date is still a serial number (a count of days), and a dropdown value is still text. The type is a layer of entry rules and display on top of those values.
Where to set a type
You can set the type of a column in either of these ways:
- Click the arrow beside the column name in the table header, or right-click the header. Choose the column type option.
- Select a cell in the column and open the table menu, then edit the column.
Choose the type from the list. Sheets applies it to the entire column body at once. The same panel lets you change the type later.
When you convert a range, Sheets makes a first guess for each column from the existing values. A column of TRUE and FALSE values often becomes a checkbox column, and a column of real dates becomes a date column. The guess is a starting point, so check every column after conversion.
Use this sample data for the examples in this chapter:
Order ID | Customer | Order Date | Amount | Paid
1001 | Acme | 2026-01-05 | 250 | TRUE
1002 | Globex | 2026-01-09 | 480 | FALSE
1003 | Initech | 2026-01-12 | 125 | TRUEName the table Orders. The columns map naturally to types: Order ID to number or text, Customer to text or dropdown, Order Date to date, Amount to number, and Paid to checkbox.
The core types
Text
Text is the general-purpose type. It accepts anything and applies no entry rules. Use it for names, notes, codes with leading zeros, and anything you will not do arithmetic on.
Identifiers deserve a decision. An order ID such as 1001 looks like a number, but you never add order IDs together. If an ID can start with zeros (00417) or contain letters, use text. A number type would drop the leading zeros. If IDs are plain integers and you want right-aligned display, either type works. Pick one and keep it consistent across tables, because lookups between tables fail when one side is text 1001 and the other is number 1001.
Number
A number column holds values you can add, average, or compare. Numbers align to the right of the cell, and you can apply number formats such as decimals, currency, or percent to the column.
The most common problem is numbers stored as text. They come from pasted data, imports, or values with stray spaces. The symptoms are:
- The values align to the left.
SUMignores them, so totals come out low.- Sorting places
100before25, because text sorts character by character.
You can test a column with two counts. COUNT counts only numeric cells, and COUNTA counts all non-empty cells.
=COUNTA(Orders[Amount]) - COUNT(Orders[Amount])A result of 0 means every non-empty cell in Amount is numeric. Any other result is the number of cells holding text.
Date
A date column stores real dates, which are serial numbers formatted for display. Because they are numbers underneath, you can subtract them, compare them, and sort them chronologically. Choosing the date type also gives you a date picker when you edit a cell.
A date typed as 2026-01-05 is usually recognized as a date, but this depends on the spreadsheet's locale. A value such as 05/01/2026 can mean 5 January or 1 May. If your spreadsheet locale and your data disagree, Sheets may read some dates correctly and leave others as text, which gives you a column that sorts in the wrong order. Check the locale in the spreadsheet settings before you import dates.
You can test that dates are real with ISNUMBER on a single cell, such as =ISNUMBER(C2). A result of TRUE means a real date. Text dates return FALSE.
Dropdown
A dropdown column restricts entries to a list you define. Each option can have a color, which makes the column easy to scan. In the column type panel you can add, remove, rename, and reorder options.
Use a dropdown when the set of values is small and stable, such as status (New, In progress, Done), region, or priority. The main benefit is consistency. Free-text status columns collect variants like done, Done , and DONE, and each variant counts as a separate group when you filter or count. A dropdown prevents that.
Two details matter:
- Renaming an option in the panel is safer than retyping the cells. Check that existing cells follow the rename. If a cell keeps its old value, it no longer matches any option.
- A dropdown value is plain text. A formula such as
=COUNTIF(Tasks[Status], "Done")works the same as it would on a text column.
Checkbox
A checkbox column shows a box in each cell. Checked means TRUE and unchecked means FALSE. This is the best type for yes/no data such as paid, shipped, or reviewed.
Because the values are real booleans, formulas can use them directly:
=COUNTIF(Orders[Paid], TRUE)With the sample data, this returns 2. To count unpaid orders, use FALSE instead. To total the amounts of paid orders, use SUMIF:
=SUMIF(Orders[Paid], TRUE, Orders[Amount])This returns 375, which is 250 plus 125.
An empty cell in a checkbox column is not the same as unchecked. Depending on how the cell was created, it may hold nothing instead of FALSE. Counting FALSE then misses it. After you change a column to checkbox, look for cells that show no box and fix them.
Choosing a type
The order of the questions matters. Test for the most restrictive type first, because a restrictive type gives you the most validation. Text is the fallback when nothing else fits.
How types affect sort, filter, and group
Sorting and filtering behave according to the type:
| Type | Sorts by | Filter options usually offered |
|---|---|---|
| Text | Alphabetical order | Values, text conditions such as contains |
| Number | Numeric value | Values, conditions such as greater than |
| Date | Chronological order | Values, conditions such as before or after |
| Dropdown | Text of the option | Values, which match the option list |
| Checkbox | `FALSE` before `TRUE` | Checked or unchecked |
The practical lesson is that a wrong type produces a wrong sort without any error message. If an Amount column sorts 100, 25, 480, the column is text. Fix the type first, and confirm the cells are real numbers. Then sort again.
Grouping, covered in a later chapter, depends on the same principle. Grouping by a dropdown column gives you one clean group per option. Grouping by a free-text column gives you one group per spelling variant.
Changing a type on a column that already has data
Changing a type does not always convert the existing values. Keep these rules in mind:
- Switching to checkbox keeps cells that are already
TRUEorFALSEand may leave other values unconverted. Review the column afterward. - Switching to dropdown does not remove values that are missing from the list. Those cells stay as they are but no longer match an option. Add the missing values to the list, or correct the cells.
- Switching text to number does not turn text into numbers by itself. Retype a cell or use a conversion formula in a helper column, such as
=VALUE(D2). Then paste the values over the original. - Switching to date has the same limit. Text that looks like a date stays text until it is re-entered or converted with
DATEVALUE.
Common errors
- Totals that are too low. Some amounts are text. Run the
COUNTAminusCOUNTcheck, then convert the text cells. - A date column that sorts in a strange order. Some dates are text, often because of locale. Confirm with
ISNUMBERand re-enter or convert them. - Duplicate-looking categories in a filter. The column is text and the values differ by case or trailing spaces. Clean the values, then move to a dropdown.
- A checkbox count that is too low. Some cells are empty instead of
FALSE. Fill them in or count with a condition that treats blanks as unchecked. - IDs that no longer match another table. One table stores them as text and the other as numbers. Use the same type on both sides of a lookup.
Practical habits
- Set types right after conversion, before you build formulas on the table. Formulas written against a wrong type can look right but return wrong results.
- Keep one type per column. A table column cannot sensibly hold a number in one row and a note such as
TBDin another. Put notes in a separate column. - Prefer dropdown over text for any column you plan to filter or group.
- Prefer checkbox over a text column of
YesandNo. Booleans work directly inCOUNTIFandSUMIF. - Recheck types after you paste data in bulk, because pasted values can bring their own formatting.
Exercise
A table named Invoices has a column Total. The formula =SUM(Invoices[Total]) returns 940, but adding the visible values by hand gives 1,240. Sorting Total ascending gives 1000, 120, 80, 40. What is the likely cause, how do you confirm it, and how do you fix it?
Show answer
Some Total cells hold text instead of numbers. SUM ignores text, so the sum is low, and text sorts character by character, which explains 1000 before 120. Confirm with =COUNTA(Invoices[Total]) - COUNT(Invoices[Total]), which returns the number of text cells (here 1, since 1000 is the value that is missing from the sum: 1240 - 940 = 300 is not 1000, so check which cells are left-aligned and sum them). Fix by setting the column type to number, then converting the text cells, for example with =VALUE(cell) in a helper column pasted back as values, and sort again.
Exercise
You have a table Tasks with a Status column that contains Done, done, DONE and "Done " (with a trailing space). What column type should you use to prevent this, and what formula counts the finished tasks afterward?
Show answer
Use a dropdown column with options such as New, In progress, and Done. First clean the existing values so each cell matches one option. Then =COUNTIF(Tasks[Status], "Done") counts finished tasks, because every finished task now has the same spelling.