Sub topic 7
How Sheets Treats Text, Numbers and Dates
This chapter assumes you can create a spreadsheet, select cells, and enter basic values. It also assumes you understand that each cell has an address such as B2.
Google Sheets does more than display what you type. It assigns each entry a data type, such as text, number, or date. The data type affects sorting, formatting, calculations, and comparisons. When a value behaves unexpectedly, checking its type is often the quickest way to find the problem.
Text and numbers
Text is a sequence of characters that Sheets does not use as a quantity. Names, product codes, notes, and phone numbers are common examples. A text value can contain digits, but digits alone do not guarantee that Sheets treats the entry as a number.
A number represents a quantity that Sheets can calculate. You can add, subtract, multiply, divide, sort, and compare numbers.
| Entry | Usual type | Example use |
|---|---|---|
| `North region` | Text | A category or label |
| `0042` | Number, often displayed as `42` | An identifier only if leading zeros are not needed |
| `'0042` | Text | A code that must keep its leading zeros |
| `19.95` | Number | A price |
| `TRUE` | Boolean value | A logical condition |
To force an entry to remain text, begin it with an apostrophe. Sheets hides the apostrophe after you press Enter, but it keeps the characters that follow as text. This is useful for postal codes, employee IDs, and other values that look numeric but should not be calculated.
A number formatted as currency is still a number. Formatting changes how the value appears, not the underlying value. For example, $19.95 can still be included in a total.
Dates and times
A date is a value that represents a calendar day. Sheets stores dates internally as serial numbers and applies date formatting to display them in a readable form. This design lets formulas compare dates and calculate the number of days between them.
For example, if A2 contains 2026-11-27 and B2 contains 2026-12-04, subtracting A2 from B2 returns 7, provided both entries are recognized as dates.
A time is stored as a fraction of a day. Noon is one-half of a day, and six hours is one-quarter. Sheets usually displays these fractions as times when the cell has a time format.
Date interpretation can depend on your spreadsheet’s locale. An entry such as 03/04/2026 may mean March 4 or April 3. Use an unambiguous format such as 2026-03-04 when sharing data across regions. You can check locale settings under File > Settings.
How Sheets decides what you entered
Sheets commonly recognizes an entry based on its appearance:
Text label → text
1250 → number
2026-03-04 → date
14:30 → time
'1250 → textRecognition is not perfect. Extra spaces, unusual punctuation, or an apostrophe can turn a value that looks numeric into text. A text value that contains a number will not always work in arithmetic. For example, adding "25" stored as text to another value may produce an error or require conversion.
You can inspect and correct a value by selecting its cell, looking at the formula bar, and checking the toolbar’s number format. Use Format > Number to choose formats such as Number, Currency, Date, or Plain text.
A practical data-entry workflow
Use this sequence when importing or entering a table:
flowchart TD
A[Enter a value] --> B{What should it represent?}
B -->|Label or code| C[Store as text]
B -->|Quantity or amount| D[Store as number]
B -->|Calendar day or time| E[Store as date or time]
C --> F[Check leading zeros and spaces]
D --> G[Apply number format]
E --> H[Check locale and date format]
F --> I[Test sorting or formulas]
G --> I
H --> Icaption: Choosing and checking a Sheets data type alt: A flowchart directs a user to store an entry as text, number, or date and then check its formatting and behavior.
After entering a small sample, test it before filling hundreds of rows. Try sorting the column or using a simple calculation. If the result is wrong, correct the data type first rather than hiding the problem with formatting.
Exercise
You enter 00127 as a product code, but Sheets displays 127. What should you do, and why?
Show answer
Store the value as text by entering '00127 or by setting the cell format to Plain text before entering it. A product code is an identifier, not a quantity, so its leading zeros are meaningful.