Excel course · Lesson 2 of 34

Entering and editing data: AutoFill, Flash Fill and Undo

Type numbers, text and dates correctly, edit cells, fill series with AutoFill, split and join text with Flash Fill, and recover with Undo.

Beginner 15 min read

Excel can only calculate with data it understands. A number typed as text, a date Excel did not recognise, or a stray space can break formulas later. In this lesson you will learn how Excel decides what kind of data you typed, how to edit cells quickly, and how to let Excel do the boring typing for you with AutoFill and Flash Fill.

Three kinds of entries

Everything you type into a cell becomes one of three things: a number (including dates, times, percentages and currency), text, or a formula (anything starting with =). Excel decides the moment you press Enter. A useful clue is alignment: by default numbers align to the right of the cell and text aligns to the left.

You typeExcel storesShown as
1250the number 12501250 (right-aligned)
12.5%the number 0.125 formatted as a percentage12.5%
2026-03-15the date serial number 46096a date in your regional format
14:30the time 0.604166…, a fraction of a day14:30
Invoice 17textInvoice 17 (left-aligned)
'00123the text 00123 (the apostrophe is hidden)00123
=B2*C2a formulaits result
Watch out. If you type a date and it stays left-aligned, Excel did not recognise it and stored it as text. That usually happens when the order of day and month does not match your Windows or macOS regional settings. Typing dates as 2026-03-15 (year-month-day) works in every region. Dates are covered fully in Dates and times: serial numbers, date math and working days.

Leading zeros are another classic trap. Product codes, postcodes and phone numbers such as 00123 lose their zeros because Excel treats them as numbers. Type an apostrophe first ('00123) or format the column as Text before typing (Home › Number › Number Format › Text). Long numbers such as 16-digit card numbers must also be text, because Excel keeps only 15 significant digits and turns the rest into zeros.

Entering and editing cells

  1. Click a cell and type. Press Enter to confirm and move down, Tab to confirm and move right, or Esc to cancel.
  2. To replace the content of a cell, just select it and type; the old content is overwritten.
  3. To change part of the content, press F2 (Mac: Ctrl+U) or double-click the cell. You are now in Edit mode and can move the cursor with the arrow keys.
  4. To clear a cell, select it and press Delete. This removes the content but keeps the formatting. To remove everything, use Home › Editing › Clear › Clear All.
  5. To type the same value into many cells at once, select them all, type the value and press Ctrl+Enter (Mac: Ctrl+Return).
  6. To start a new line inside a cell, press Alt+Enter (Mac: Option+Return).
Tip. After you press Tab several times across a row and then press Enter, Excel returns to the column where you started, on the next row. That makes typing a table row by row fast and natural.

Undo and Redo

Mistakes are cheap in Excel. Press Ctrl+Z (Mac: Cmd+Z) to undo the last action, and keep pressing to go further back. The arrow next to the Undo button on the Quick Access Toolbar shows a list of recent actions, so you can undo several steps in one go. Ctrl+Y (Mac: Cmd+Y) redoes what you undid, and when there is nothing to redo it repeats your last action, for example applying the same fill colour to another cell.

Watch out. Some actions cannot be undone. Running a VBA macro clears the undo history, and so does saving in some situations. Deleting a sheet cannot be undone either. Before a risky change on an important file, save a copy.

AutoFill: let Excel continue the pattern

Select a cell and look at its bottom-right corner: there is a small square called the fill handle. Drag it down or across and Excel continues whatever pattern it sees. Double-click it and Excel fills down automatically as far as the column next to it has data.

Start withDrag the fill handle and get
JanuaryFebruary, March, April …
MonTue, Wed, Thu …
Q1Q2, Q3, Q4, Q1 …
Invoice 1Invoice 2, Invoice 3 …
2026-01-312026-02-01, 2026-02-02 … (one day at a time)
5 and 10 (two cells selected)15, 20, 25 … (the step is learned from the two cells)
a single number such as 100100, 100, 100 … (a copy; hold Ctrl while dragging to count up instead)

When you release the mouse, a small Auto Fill Options button appears. Click it to change what was filled: Copy Cells, Fill Series, Fill Formatting Only, Fill Without Formatting, and for dates also Fill Weekdays, Fill Months and Fill Years. Fill Months on 2026-01-31 gives the last day of each month: 2026-02-28, 2026-03-31 and so on.

Filling a series precisely

  1. Type the first value, for example 2026-01-05 (a Monday), in A2.
  2. Select A2 and choose Home › Editing › Fill › Series.
  3. Choose Series in: Columns, Type: Date, Date unit: Weekday, Step value: 1 and Stop value: 2026-01-30.
  4. Click OK. Excel lists every working day of January from the 5th to the 30th, skipping weekends.

AutoFill with formulas

AutoFill is how you copy a formula down a column. In the grid below the formula in D2 is =B2*C2. When you double-click the fill handle, Excel writes =B3*C3 in row 3, =B4*C4 in row 4 and so on, because the references shift with each row. Why that happens, and how to stop it when you need to, is the subject of Cell references: relative, absolute and mixed.

D5fx=B5*C5
ABCD
1InvoiceQtyUnit priceAmount
2INV-1001418.574
3INV-1002107.2572.5
4INV-10032145290
5INV-1004632192

The formula typed in D2 (=B2*C2) was filled down; D5 contains =B5*C5.

Result: 192

Custom lists

Excel knows weekdays and months out of the box. You can teach it your own sequences, such as your regions (North, South, East, West) or departments. On Windows choose File › Options › Advanced, scroll to General and click Edit Custom Lists. On a Mac choose Excel › Preferences › Custom Lists. Type the items, one per line, and click Add. From now on typing North and dragging gives the rest. Custom lists can also be used as a sort order, see Sorting and filtering data.

Flash Fill: fill by example

Flash Fill, available since Excel 2013, looks at one or two examples you type and works out the rule. It is ideal for splitting names, joining columns or reformatting codes, without writing a formula.

ABC
1Full nameFirst nameEmail
2Maria LopezMaria[email protected]
3John CarterJohn[email protected]
4Aiko TanakaAiko[email protected]
5Peter NovakPeter[email protected]

Type only B2 and C2 by hand; Flash Fill completes the other rows.

  1. Next to the full names, type the first example by hand: Maria in B2.
  2. Move to B3 and start typing J. Excel shows a grey preview of the whole column. Press Enter to accept it.
  3. If no preview appears, select B2:B5 and choose Data › Data Tools › Flash Fill, or press Ctrl+E.
  4. Repeat for the email column: type [email protected] in C2, then press Ctrl+E in C3.
Watch out. Flash Fill produces fixed values, not formulas. If a name in column A changes later, column B does not update. It can also guess the wrong rule when names are irregular (middle names, double surnames), so always scan the result. For results that must update automatically, use text functions such as TEXTBEFORE or LEFT, explained in Text cleanup: TRIM, CLEAN, TEXTSPLIT, Flash Fill and Text to Columns.
Note. Flash Fill is available in Excel for Windows from 2013, Excel for Mac from 2016, and Excel for the web. If it does not trigger automatically, check File › Options › Advanced › Automatically Flash Fill.

Copy, cut and paste

Ctrl+C, Ctrl+X and Ctrl+V (Mac: Cmd+C, Cmd+X, Cmd+V) work as in any program, but Excel adds Paste Special (Ctrl+Alt+V, Mac: Cmd+Ctrl+V). Paste Special lets you paste only Values (turning formulas into their current results), only Formats, only Column widths, or use Transpose to turn rows into columns. Pasting values is the standard way to freeze the result of a calculation or of Flash Fill-like formula work.

Tip. To move a range quickly, select it, point to its border until the pointer becomes a four-headed arrow, and drag. Hold Shift while dragging to insert the range between existing rows instead of overwriting them.

Inserting and deleting rows and columns

Right-click a row number and choose Insert to add an empty row above it, or Delete to remove the row. The shortcuts are Ctrl++ (insert) and Ctrl+- (delete); on a Mac use Ctrl+Shift+= and Cmd+-. Formulas that refer to the area adjust automatically, which is one of the reasons to always use cell references in formulas instead of typed numbers.

Check yourself

1. You type 2026-03-15 and it appears left-aligned. What most likely happened?

2. How do you keep the leading zeros in a product code like 00123?

3. You select A1 with the value 100 and drag the fill handle down. What do you get?

4. What is the main limitation of Flash Fill?

5. Which shortcut enters the same value into every selected cell at once?

⬇Practice workbookExamples with live formulas + practice sheets · .xlsx · 12 KB