Sub topic 2
Entering text, numbers, dates, and formulas
This chapter covers what happens between pressing a key and seeing a value in a cell. It assumes you can open a sheet, select cells, and use copy and paste. You will learn how to start and finish an entry, how to force Sheets to treat input as text, how dates and numbers are stored, and how formulas are recognized.
What a cell holds versus what it shows
Every cell has two layers. The stored value is what Sheets keeps: a string, a number, a boolean, or a formula. The displayed value is what appears in the grid after formatting is applied. When you select a cell, the formula bar shows the stored content. For a formula, the formula bar shows the formula and the grid shows its result.
Keep this split in mind throughout. Many entry surprises come from Sheets storing something different from what you typed.
Starting, finishing, and cancelling an entry
Select a cell and start typing. The cell enters edit mode, and your text appears in both the cell and the formula bar. Typing over an existing cell replaces its whole content.
| Key | Effect |
|---|---|
| Enter | Commits the entry and moves down one cell |
| Tab | Commits the entry and moves right one cell |
| Shift+Enter, Shift+Tab | Commits and moves up or left |
| Esc | Cancels the edit and restores the previous content |
| Alt+Enter (Windows, ChromeOS) | Inserts a line break inside the cell |
Pressing Tab across a row and then Enter returns you to the column where you started the row. This makes entering a table row by row fast.
Text
Anything Sheets cannot read as a number, date, time, boolean, or formula is stored as text. Text aligns to the left by default. A cell containing Q4 report or A-100 is text.
To force text, start the entry with an apostrophe. The apostrophe is not stored and does not appear in the cell.
'007The cell displays 007 and stores it as text. Use this for identifiers such as ZIP codes, phone numbers, and product codes, where leading zeros matter and you will never do arithmetic on the value.
You can also join text with the & operator, which is a formula, so it starts with =:
=A2&" "&B2Numbers
If the typed content looks like a number, Sheets stores a number and aligns it to the right. A few input details matter.
- Digit grouping characters such as commas are accepted and removed from the stored value. Typing
1,234.5stores 1234.5, and the cell may adopt a number format. - A trailing percent sign stores a fraction. Typing
15%stores 0.15 and applies a percent format. - A currency symbol such as
$stores the plain number and applies a currency format. - A leading zero is dropped. Typing
007stores 7. - A leading plus sign is dropped. Typing
+5stores 5.
The decimal separator depends on your spreadsheet locale. A later chapter covers locale. For now, note that 1,5 may be a number in one locale and text in another.
Dates and times
Sheets stores a date as a number: the count of days since December 30, 1899. A time is stored as a fraction of a day, so noon is 0.5. The format decides whether you see 2026-11-27, Nov 27, 2026, or the raw serial number.
Typing a recognizable date such as 2026-11-27 or 11/27/2026 stores a date serial number and applies a date format. Dates align to the right. This storage lets you do arithmetic: =B2-A2 gives the number of days between two dates.
Ambiguous input is the common trap. Typing 1/2 can be read as January 2 rather than the fraction one half. Typing 3-4 may become a date. If you need the literal text, prefix it with an apostrophe.
To see a date as text, use TEXT. This produces a string, not a date, so you cannot do date arithmetic on the result:
=TEXT(A2,"yyyy-mm-dd")Formulas
An entry that starts with = is a formula. Sheets parses what follows, computes it, and shows the result. Formulas combine these parts:
- Constants, such as
10or"text"(text constants need double quotes). - Cell references, such as
B2, and ranges, such asB2:B10. - Operators:
+,-,*,/,^,&for joining text, and comparison operators such as>and=. - Functions, such as
SUM(...), which take arguments in parentheses separated by commas.
=SUM(B2:B10)This adds the numbers in B2 through B10. Text and empty cells in the range are ignored by SUM.
A formula reference can be relative or absolute. A relative reference such as B2 shifts when the formula is copied or filled. A $ locks the part that follows it. Here, $E$1 stays fixed while B2 changes to B3, B4, and so on:
=B2*$E$1You can also build a reference by clicking cells while editing a formula. Sheets inserts the address for you and colors each reference to match its outline on the grid, which helps when checking a formula.
Argument separators depend on locale
In many locales the function argument separator is a semicolon rather than a comma, because the comma is the decimal separator. If a formula that works in an example gives a parse error in your sheet, check the separator your locale uses.
Common error values
| Error | Typical cause |
|---|---|
| #NAME? | Misspelled function, or text without quotes treated as a name |
| #DIV/0! | Division by zero or by an empty cell |
| #VALUE! | An argument of the wrong type, such as text in arithmetic |
| #REF! | A reference to a deleted cell, row, or column |
| #N/A | A lookup found no match |
| #ERROR! | The formula cannot be parsed, for example unmatched parentheses |
Hovering over the red-cornered error cell shows an explanation.
Seeing how Sheets interpreted your entry
You can check the interpretation in three ways:
- Look at the alignment. Left usually means text, right usually means number or date.
- Select the cell and read the formula bar. A formula shows with its
=. A date shows in a date form. - Use a test formula in another cell, such as
=ISNUMBER(A2), which returns TRUE or FALSE.
Editing an entry while it is open
Double-click a cell, or select it and press F2, to edit its content without replacing it. The cursor lands at the end of the text. Press Enter to commit or Esc to discard the change. Editing a cell after it was entered re-runs the same interpretation, so changing 5 to 5 (with a trailing space) can turn a number into text.
Exercise
You type 00123 into a cell and it displays 123. You type 2026-11-27 in the next cell and it right-aligns. What is stored in each cell, and what should you type to keep 00123 exactly as written?
Show answer
The first cell stores the number 123, because Sheets reads 00123 as a number and drops the leading zeros. The second cell stores a date serial number (days since December 30, 1899) displayed with a date format, which is why it right-aligns. To keep 00123, type an apostrophe first ('00123), which stores it as text.
Exercise
A column of amounts totals less than you expect. Some entries are left-aligned. What is the likely cause, and how can you test one entry?
Show answer
The left-aligned entries are stored as text, so SUM skips them. Test an entry with =ISNUMBER(A2), which returns FALSE for text. Retype the value without the stray character or space to convert it to a number.