Sub topic 8
Preparing a Date Field for a Timeline
This chapter assumes you can build a basic PivotTable, know how to drag fields between the Rows, Columns, Values, and Filters areas, and can tell a text value from a true date value in a cell. By the end you will be able to check whether a field qualifies for a timeline, repair one that does not, and predict why the Insert Timeline button is disabled.
Why a timeline is picky about its data
A timeline is a filter control that works on dates. It builds its time scale (years, quarters, months, days) from the date values stored in the source data. If Excel cannot read a column as dates, it has nothing to build a scale from, so it refuses to offer the control.
A slicer will work with almost any field, because it lists whatever distinct items the field holds. A timeline has stricter conditions. The conditions below all have to be true at once.
| Requirement | What it means | Typical failure |
|---|---|---|
| The field holds true dates | Cells contain date serial numbers formatted as dates | Dates imported as text such as `"2026-03-14"` |
| The field is in the PivotTable's source | The date column is part of the pivot cache | The date column sits outside the source range |
| The PivotTable is a normal one | It is based on a range, an Excel Table, or the Data Model | Some unsupported connection types |
| No blank or text cells in the field | Every row has a valid date | A blank or a `"N/A"` entry in the column |
| The workbook is in a modern format | Saved as `.xlsx`, `.xlsm`, or `.xlsb` | Opened from an old `.xls` file in compatibility mode |
Timelines were added in Excel 2013. Excel 2010 and earlier do not have them.
True dates versus text that looks like dates
Excel stores a true date as a serial number. The number 1 is 1 January 1900, and each day adds 1. Format controls only how the number is shown. Text that merely looks like a date is stored as characters and has no serial number.
You can tell the two apart in a few ways.
- True dates are right-aligned by default. Text is left-aligned.
- Selecting a true date cell shows a date format (such as Short Date) in the Home tab's Number group. Text shows General or Text.
- Changing the number format to General turns a true date into a number such as 46095. Text stays as it was.
=ISNUMBER(A2)returnsTRUEfor a true date andFALSEfor text.
=ISNUMBER(A2)To test a whole column at once, count the cells that are not numbers. A result of 0 means every cell is a true date or a blank.
=SUMPRODUCT(--NOT(ISNUMBER(A2:A5000)))-COUNTBLANK(A2:A5000)Blank cells return FALSE from ISNUMBER, so the formula subtracts them. Check blanks separately, because they can also cause trouble (see the section on blanks).
Converting text dates to true dates
Several methods work. Choose by how much data you have and how the text is formatted.
Text to Columns
This is the quickest fix for a single column that uses one consistent format.
- Select the date column in the source data.
- On the Data tab, choose Text to Columns.
- Choose Delimited and select Next, then Next again.
- In step 3, choose Date under Column data format and pick the order your text uses, for example YMD.
- Select Finish.
Then apply a date number format from the Home tab, because the conversion sometimes leaves General formatting.
A helper column with DATEVALUE
If you cannot change the original column, add a new one beside it.
=DATEVALUE(A2)DATEVALUE reads text such as "14/03/2026" using your system's regional settings. If your settings expect month before day, a text date like this one fails with #VALUE!. For text in a fixed layout, build the date from its parts, which does not depend on regional settings:
=DATE(LEFT(A2,4), MID(A2,6,2), RIGHT(A2,2))This formula turns "2026-03-14" into 14 March 2026. Copy it down, then format the result as a date.
Values with a time component
A date with a time, such as 14 March 2026 09:30, is still a true date. The timeline groups it by day, so the time does not stop it working. If you want to work with whole days only, use =INT(A2) in a helper column to strip the time.
Blanks and stray text in the date column
A single blank cell or a text entry such as "TBD" in the date column can stop the timeline from being offered. Excel needs the whole column to be dates.
To find the offending cells:
- Select the date column and open Home > Find & Select > Go To Special.
- Choose Constants, then tick only Text, and select OK. This selects text entries.
- Repeat with Blanks to find empty cells.
Then fix each one. Replace a text entry with a real date, or delete the row if the record is not valid. For blanks, enter a date, or filter out and remove the incomplete rows from the source.
> Do not replace blanks with 0. Excel treats 0 as a date (0 January 1900), which adds an odd early item to the time scale.
The block above is a warning, so here it is as a callout:
Keeping the source range current
A timeline only knows about rows that are inside the PivotTable's source. If you add new rows below a plain range, they are missed until you extend the source. Convert the data to an Excel Table to avoid this.
- Click any cell in the data.
- Press Ctrl+T and confirm that the table has headers.
- Point the PivotTable at the table: PivotTable Analyze > Change Data Source, then enter the table name.
New rows added to the table are then included each time you refresh the PivotTable. After a refresh, a timeline picks up the new dates automatically.
Date fields that Excel groups automatically
In Excel 2016 and later, dragging a date field into the Rows area often groups it automatically into Years, Quarters, and Months. This produces extra fields in the Field List such as Years and Quarters.
This grouping does not stop a timeline from working. The timeline uses the original date field, not the grouped one. Some details are worth knowing:
- Insert Timeline lists the original date field. If several date columns exist, you can choose among them.
- Grouped fields such as
Yearsare not shown as timeline options, because they are not date fields. - If you group a date field in the PivotTable manually (right-click, Group), the timeline can still use it, but the two controls can disagree about the time level. Ungroup the field first if the results look inconsistent.
Checking a field before you insert
Run through this short checklist before inserting the timeline.
- Confirm the column uses true dates with
ISNUMBER. - Confirm that there are no blanks or text entries.
- Confirm that the PivotTable's source includes the date column and all rows. Use Change Data Source to check.
- Refresh the PivotTable.
- Select a cell in the PivotTable and look at the PivotTable Analyze tab. Insert Timeline should be enabled.
Common errors and what they mean
| Symptom | Likely cause | Fix |
|---|---|---|
| Insert Timeline is greyed out | The active cell is not inside a PivotTable | Click a cell in the PivotTable first |
| Excel shows "PivotTable report does not contain date fields" | No column holds true dates | Convert text dates, refresh, and try again |
| The date column does not appear in the timeline list | The field is text or contains a mix of types | Run the `ISNUMBER` check and clean the column |
| The timeline starts in 1900 | A blank or `0` was read as a date | Remove the placeholder and refresh |
| New rows do not appear | Source range does not include them | Use an Excel Table as the source |
After correcting the data, always refresh the PivotTable with Data > Refresh All or PivotTable Analyze > Refresh. The pivot cache keeps its own copy of the data, so a fix in the worksheet has no effect until you refresh.
Exercise
A column of order dates was imported from a CSV file. The cells are left-aligned, and =ISNUMBER(A2) returns FALSE. Insert Timeline is greyed out even after you click inside the PivotTable. Name two ways to repair the column, and say what you must do afterwards for the timeline to become available.
Show answer
The cells are text, not true dates. You can repair them with Data > Text to Columns (choose Date and the matching order, such as YMD), or with a helper column that uses DATEVALUE or DATE(LEFT(...), MID(...), RIGHT(...)). Then format the result as a date, make sure the PivotTable's source uses the corrected column (a helper column must be inside the source range or Table), and refresh the PivotTable. After the refresh, Insert Timeline should be enabled.
Exercise
Your date column has 4,000 valid dates and 12 blank cells. A colleague suggests typing 0 into the blanks. Why is that a bad idea, and what are two better options?
Show answer
Excel reads 0 as a date in January 1900, so the timeline's scale stretches back more than a century and the slider becomes hard to use. Better options are to enter the real date for each record, or to remove the incomplete rows from the source (for example by deleting them or filtering them out before building the PivotTable). Refresh the PivotTable afterwards.