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.
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 type | Excel stores | Shown as |
|---|---|---|
| 1250 | the number 1250 | 1250 (right-aligned) |
| 12.5% | the number 0.125 formatted as a percentage | 12.5% |
| 2026-03-15 | the date serial number 46096 | a date in your regional format |
| 14:30 | the time 0.604166…, a fraction of a day | 14:30 |
| Invoice 17 | text | Invoice 17 (left-aligned) |
| '00123 | the text 00123 (the apostrophe is hidden) | 00123 |
| =B2*C2 | a formula | its result |
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
- Click a cell and type. Press
Enterto confirm and move down,Tabto confirm and move right, orEscto cancel. - To replace the content of a cell, just select it and type; the old content is overwritten.
- 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. - 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. - To type the same value into many cells at once, select them all, type the value and press
Ctrl+Enter(Mac:Ctrl+Return). - To start a new line inside a cell, press
Alt+Enter(Mac:Option+Return).
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.
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 with | Drag the fill handle and get |
|---|---|
| January | February, March, April … |
| Mon | Tue, Wed, Thu … |
| Q1 | Q2, Q3, Q4, Q1 … |
| Invoice 1 | Invoice 2, Invoice 3 … |
| 2026-01-31 | 2026-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 100 | 100, 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
- Type the first value, for example
2026-01-05(a Monday), inA2. - Select
A2and choose Home › Editing › Fill › Series. - Choose Series in: Columns, Type: Date, Date unit: Weekday, Step value: 1 and Stop value: 2026-01-30.
- 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.
| A | B | C | D | |
|---|---|---|---|---|
| 1 | Invoice | Qty | Unit price | Amount |
| 2 | INV-1001 | 4 | 18.5 | 74 |
| 3 | INV-1002 | 10 | 7.25 | 72.5 |
| 4 | INV-1003 | 2 | 145 | 290 |
| 5 | INV-1004 | 6 | 32 | 192 |
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.
| A | B | C | |
|---|---|---|---|
| 1 | Full name | First name | |
| 2 | Maria Lopez | Maria | maria.lopez@company.com |
| 3 | John Carter | John | john.carter@company.com |
| 4 | Aiko Tanaka | Aiko | aiko.tanaka@company.com |
| 5 | Peter Novak | Peter | peter.novak@company.com |
Type only B2 and C2 by hand; Flash Fill completes the other rows.
- Next to the full names, type the first example by hand:
MariainB2. - Move to
B3and start typingJ. Excel shows a grey preview of the whole column. PressEnterto accept it. - If no preview appears, select
B2:B5and choose Data › Data Tools › Flash Fill, or pressCtrl+E. - Repeat for the email column: type
maria.lopez@company.cominC2, then pressCtrl+EinC3.
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.
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?
Numbers and dates align right by default. Left alignment is a hint that Excel stored text.
2. How do you keep the leading zeros in a product code like 00123?
An apostrophe or the Text format tells Excel to keep the entry as text, zeros included.
3. You select A1 with the value 100 and drag the fill handle down. What do you get?
A single number is copied. Hold Ctrl while dragging, or select two cells to show the step, to create a series.
4. What is the main limitation of Flash Fill?
Flash Fill writes values, not formulas, so you must run it again if the source data changes.
5. Which shortcut enters the same value into every selected cell at once?
Ctrl+Enter (Mac: Ctrl+Return) fills the whole selection. Alt+Enter adds a line break, Ctrl+E is Flash Fill.