Skip to content
Tutorials Center
My learning

Topics

Lesson 3 of 93 ยท Getting Started

Entering and Editing Data

Learn how Excel decides whether an entry is text, a number or a date, how to edit cells, use Autofill and Flash Fill, and avoid common data-entry surprises.

Typing into a cell looks trivial, yet it is where many spreadsheet problems begin. Excel does not store what you typed. It interprets it: 12 becomes a number, 3/4 may become a date, 007 loses its zeros, and =A1+A2 becomes a formula. Knowing the rules lets you predict the outcome instead of fighting it.

In this lesson you will learn how Excel classifies entries, how to edit and undo, how to fill series quickly with Autofill and Flash Fill, and how to keep codes such as ZIP numbers intact. The real Excel cannot run here, so the type-detection logic is shown with a JavaScript stand-in that follows Excel's usual (US English) rules.

Text, numbers, dates and logical values

When you press Enter, Excel looks at your entry and picks a data type:

You type Excel stores Shown alignment
Hello, A-100 Text Left
42, -3.5, 1,250 Number Right
15% Number 0.15 with percent format Right
$9.99 Number 9.99 with currency format Right
3/15/2025, 15-Mar-2025 Date (a number with a date format) Right
TRUE, false Logical value Centered
=1+2 Formula, result 3 Depends on result
'007 Text 007 (apostrophe is not stored) Left

Alignment is your first clue: if a number sits on the left side of a cell, it is probably text that looks like a number, and SUM will ignore it. That is one of the top causes of wrong totals, covered again in Text, VALUE and Number-as-Text Problems.

Dates deserve a note. Excel stores a date as a plain serial number: the count of days since a starting point, with times as fractions of a day. The date format is only a costume. That is why you can subtract two dates to get the days between them. The full story is in Dates and Times in Excel.

Date interpretation depends on your computer's regional settings. 3/4/2025 is March 4 on a US-configured computer and April 3 in many other countries. Excel guesses silently, so for shared files prefer an unambiguous form such as 2025-03-04.

A type-detection stand-in

The function below imitates Excel's decision. It is a simplified model: it covers the common cases from the table above, not every format Excel understands.

JS How Excel classifies what you type

Press Run (or Ctrl + Enter) to see the console output here.

No output.

Two results are worth pausing on. 007 becomes the number 7 (leading zeros are gone), while '007 stays text. And 12 apples or 1.5.3 fall back to text, so they would be left-aligned and ignored by SUM.

Entering and editing

Basic entry rules:

  1. Select a cell and type. The status bar switches from Ready to Enter.
  2. Confirm with Enter (moves down), Tab (moves right) or by clicking another cell. Press Esc to cancel and keep the old value.
  3. To change a cell, select it and press F2 (or double-click it). You are now in Edit mode: the arrow keys move within the text. In Enter mode they would move to another cell.
  4. Typing in a cell replaces its content; to edit part of it use F2 or the formula bar.
  5. Alt+Enter starts a new line inside the same cell.
  6. Delete clears the contents but keeps formatting; use Home โ†’ Clear โ†’ Clear All to remove formatting too.

Press Ctrl+Enter after typing to confirm and stay on the same cell, and select a block first and use Ctrl+Enter to fill the same entry into every selected cell at once.

Undo, redo and AutoCorrect

Ctrl+Z undoes up to 100 recent actions, and Ctrl+Y redoes them. You can also click the arrow next to Undo in the Quick Access Toolbar to undo several steps at once. Undo does not survive closing the workbook, and running a macro clears the undo list.

Excel also applies AutoComplete (suggesting earlier text from the same column as you type) and AutoCorrect (fixing teh or turning (c) into ยฉ). Both can be switched off in File โ†’ Options โ†’ Proofing and Advanced. An annoying one: typing 1-2 or Mar 5 is turned into a date, and entries like 1E5 become scientific numbers. If you want text, type an apostrophe first or format the cells as Text beforehand.

Autofill: let Excel continue the pattern

Select a cell, point at the small square in its bottom-right corner (the fill handle), and drag. Excel continues the pattern:

  • One cell with Mon fills Tue, Wed, ...; Jan fills Feb, ...; Q1 fills Q2, ...
  • Two cells with 1 and 3 fill 5, 7, 9 (a number series needs two samples to learn the step).
  • A single number such as 5 is copied, unless you hold Ctrl while dragging (which makes a series) or choose Fill Series in the small options button that appears after dragging.
  • Formulas are copied with their references adjusted (see Cell References).
  • Double-clicking the fill handle fills down as far as the neighboring column has data.

Under Home โ†’ Fill โ†’ Series you can set an exact step and stop value, and Custom Lists (File โ†’ Options โ†’ Advanced โ†’ Edit Custom Lists) teach Excel your own sequences, such as a list of department names.

Series prediction

This stand-in learns a simple series from the first one or two cells, the way the fill handle does for numbers and month or weekday names.

JS Autofill stand-in: continue a series

Press Run (or Ctrl + Enter) to see the console output here.

No output.

The real Autofill is smarter: it also handles dates, Item 1-style text with numbers, and custom lists. The idea is the same.

Flash Fill: patterns from examples

Flash Fill (Ctrl+E) notices a pattern in what you type next to a column and fills the rest. Suppose column A holds full names like Ada Lovelace and you type Ada in B1. Start typing the next first name in B2 and Excel shows a gray preview for the rest; press Enter to accept it. You can also run it from Data โ†’ Flash Fill. It works for splitting, joining, changing case and reformatting phone numbers or IDs.

Flash Fill produces static values, not formulas: if the source changes, the result does not. When the data may change, use text formulas (see Joining and Splitting Text). Always scan the results; the pattern guess can be wrong on odd rows.

Keeping codes intact

Product codes, ZIP codes, phone numbers and IDs are labels, not quantities. To keep leading zeros:

  1. Type an apostrophe first ('00123), or
  2. Format the cells as Text before typing (Home โ†’ Number format box โ†’ Text), or
  3. Use a custom number format such as 00000 to display zeros while the value stays numeric (see Formatting Cells).

Excel also keeps only 15 significant digits of a number. A 16-digit credit-card number typed as a number becomes 1234567890123450: the last digit is replaced by 0. Such identifiers must be entered as text.

Check your understanding

Quick check ยท 5 questions

of 5 answered You scored / 5 ยท perfect!

  1. 1. You type 00123 in a General-formatted cell. What does Excel store?

    Excel reads 00123 as a number and drops the leading zeros. Type '00123 or format the cell as Text to keep them.
  2. 2. Which key puts a cell into Edit mode so the arrow keys move inside its text?

    F2 switches the active cell to Edit mode. Double-clicking the cell does the same.
  3. 3. What is the main difference between Flash Fill and a text formula?

    Flash Fill writes plain values from a pattern it guessed. A formula keeps recalculating when the source cells change.
  4. 4. To make the fill handle continue 5, 10, 15 rather than copying a single 5, what must you provide?

    Excel learns the step from two cells (or you hold Ctrl or use Fill Series). A single number is copied by default.
  5. 5. You see the number 12 left-aligned in a cell. What does that most likely mean?

    Numbers align right by default, so a left-aligned 12 is probably text, and functions like SUM ignore it.

Summary

  • Excel interprets entries as text, numbers (including percent, currency and dates), logical values or formulas.
  • Default alignment is a clue: text left, numbers right, logical values centered.
  • Dates are serial numbers with a date format; ambiguous dates like 3/4/2025 depend on regional settings.
  • F2 edits a cell, Esc cancels, Ctrl+Z undoes; the fill handle continues series; Flash Fill (Ctrl+E) copies a pattern but yields fixed values.
  • Keep IDs and leading zeros by entering them as text; numbers keep only 15 significant digits.

Next: Workbooks, Worksheets and Navigation.