Excel Flash Fill for Number Sequences: How It Works

How-to basics · Updated November 3, 2026

Excel Flash Fill for Number Sequences: How It Works

Excel Flash Fill can sometimes extend a number pattern when you show it examples, but it is designed to recognize patterns in entered data, not to create dependable arithmetic sequences. For a predictable run of numbers, use the fill handle, Home > Fill > Series, or the SEQUENCE function; use Flash Fill when the numbers are part of a pattern you want Excel to imitate.

What Flash Fill does with numbers

Flash Fill looks at examples you type and tries to infer the transformation or pattern behind them. It is especially useful for reshaping existing values: extracting a code from a longer entry, joining pieces of text, or making a consistent label from data in another column. For example, if column A contains product IDs such as AB-1047 and AB-2083, you could enter 1047 and 2083 in column B. Flash Fill may recognize that you want the digits after the hyphen and fill the remaining rows.

A number sequence is a different task. A sequence such as 5, 10, 15, 20 is governed by a clear starting value and step size. Flash Fill does not give you fields for those settings, and its prediction is not a reliable way to specify how many numbers to generate. Even if Excel recognizes two or more examples and continues a simple pattern, that behavior should be treated as a best guess rather than a controlled series.

The distinction matters because a result that looks numeric may actually be text. Flash Fill can reproduce a displayed pattern, including leading zeros or separators, while a sequence formula or Fill Series is usually a better choice when you need values that can be calculated with, sorted numerically, or used as numbers in another formula.

When Flash Fill is a reasonable choice

Use Flash Fill when each output is derived from existing rows and the rule is easy to demonstrate with examples. It can save time when the desired result is awkward to express with a formula, particularly for one-time cleanup. Examples include separating the numeric portion of an ID, standardizing a mixed list of labels, or combining a number with a fixed prefix.

  • Extracting digits: Show the desired numeric portion from two or more source entries, then ask Flash Fill to complete the column.
  • Adding a label: If source values are 17, 23, and 41, examples such as Item 17 and Item 23 may suggest a repeated text-and-number format.
  • Reformatting codes: Demonstrate how a source code should be rearranged or separated, then inspect the suggested results for exceptions.

Flash Fill is less suitable when you need a precise count, a defined increment, a sequence that must recalculate when its starting value changes, or a series that continues automatically as new rows are added. Those requirements call for a sequence tool or formula.

Run Flash Fill in Excel for Microsoft 365

In Excel for Microsoft 365 on Windows, put the source values in one column and the desired results in the adjacent column. Use at least two examples when the pattern could be interpreted in more than one way. Then use the command or keyboard shortcut:

  1. Enter the first intended result next to the first source value.
  2. Enter a second result next to the next source value, following the same rule.
  3. Select the next blank cell in the output column, or select the blank cells you want to fill.
  4. Choose Data > Flash Fill, or press Ctrl+E on Windows.
  5. Review the filled values against the source data before relying on them.

Flash Fill may also display a suggested completion as you type. You can accept a suggestion when it matches the intended pattern; if it does not appear, use the Data tab command instead. The setting is enabled by default in many desktop installations. On Windows, check File > Options > Advanced and the Editing options for Automatically Flash Fill if Excel does not offer suggestions.

On Mac, use Data > Flash Fill when the command is available in the Excel ribbon. The Windows Ctrl+E shortcut should not be assumed to work on every Mac keyboard or Excel build, so the ribbon command is the dependable route. Excel for the web may not expose the same desktop Flash Fill workflow; if you do not see the command, use a formula or open the workbook in desktop Excel.

Why two examples may not define a sequence

Two numbers can imply more than one rule. Given 2 and 4, a continuation might add 2, double the previous value, or follow a special list that happens to begin with those values. A human can supply context, but Flash Fill only has the examples and nearby data to infer what you mean. More examples can make an intended pattern clearer, but they do not turn Flash Fill into a series generator with explicit controls.

For a simple increasing series, entering 1 and 2 as examples may lead Excel to offer 3, 4, and so on in some situations. Do not rely on that result for a workbook where the step size, endpoint, or numeric type matters. Instead, choose a tool that states those requirements directly. This also avoids confusion between a pattern transformation, such as extracting digits from IDs, and a mathematical progression that creates new values.

Create a controlled sequence with SEQUENCE

For a dynamic array, use SEQUENCE in Excel for Microsoft 365 or Excel 2021 and later. It returns a specified number of rows and can set the number of columns, starting value, and step. With the formula entered in A2 and an empty area below it, Excel spills the results into the cells below.

With A2 as the starting cell and no other data blocking the spill range, enter =SEQUENCE(10). The result is the ten numbers 1 through 10, one per row. The one-argument form starts at 1 and increases by 1.

With A2 as the starting cell and the same clear spill area, enter =SEQUENCE(10,1,5,5). The result is 5, 10, 15, 20, 25, 30, 35, 40, 45, and 50: ten rows, one column, starting at 5, with a step of 5. Change the first argument to change the number of rows, and the final argument to change the increment.

SEQUENCE is useful when the list should update from a formula, but it needs room to spill. If cells in the destination area are occupied, Excel can return a #SPILL! error. Clear the blocking cells or place the formula where the full result can expand. Earlier Excel versions without SEQUENCE can use the fill handle or a copied formula instead.

Use the fill handle or Series command

For a one-time series, the fill handle is straightforward. Type the first two values, such as 5 in A2 and 10 in A3, select both cells, and drag the small square at the lower-right corner of the selection down. Selecting both starting values tells Excel to continue the interval of 5. If you select only one value, Excel will often copy it rather than infer the intended increment.

You can also select the destination cells and choose Home > Fill > Series. In the Series dialog, specify whether the sequence runs in rows or columns, choose a type such as Linear, and enter the step value and stopping value. This is helpful when you know the exact endpoint or need an increment that is not obvious from a couple of examples. For instance, a start of 100, step of 25, and stop of 200 produces 100, 125, 150, 175, and 200.

These methods create values rather than a formula-driven list. If you later change the first value, a manually filled series does not necessarily recalculate as a linked sequence. Use SEQUENCE or a row-by-row formula if the numbers must respond to changing inputs.

Use a copied formula in older Excel versions

A basic formula is a reliable fallback in versions without SEQUENCE. With the starting value 5 in A2 and the next value to be calculated in A3, enter =A2+5 in A3, then copy or fill the formula downward. The results are 10, 15, 20, and so on. Each row adds 5 to the number above it, so changing the starting value in A2 changes the rest of the chain.

This chained approach is simple, but every result depends on the preceding cell. For a series where each row should calculate its value directly from its position, put 5 in A2 and use this formula in A3, then fill it down: =5+(ROW()-ROW($A$2))*5. The result in A3 is 10, and the next row returns 15. The formula uses the row number to calculate the offset, so an accidental change in one intermediate result does not alter every later increment. Replace the two instances of 5 with the desired starting value and step if you adapt it.

Common Flash Fill problems and checks

If Flash Fill does nothing, check that the source and examples are arranged in neighboring columns, that the pattern is consistent, and that the feature is enabled. Try giving a second example, then choose Data > Flash Fill again. If the data has irregular exceptions, Excel may be unable to infer one rule for the whole range; split the data into simpler groups or use a formula that handles the cases explicitly.

  • Leading zeros disappear: A value such as 007 may be interpreted as the number 7. If the zeros are meaningful, treat the identifier as text or apply an appropriate number format, and check whether the filled output preserves the intended appearance and type.
  • Some rows are wrong: Flash Fill can make a plausible but incorrect guess for unusual entries. Inspect the entire output, especially blank source cells, inconsistent separators, and rows that do not match the examples.
  • The result will not update: Flash Fill produces filled entries, not a live rule tied to the source. Changing a source value later does not guarantee that the corresponding Flash Fill result will change. Rerun Flash Fill or use a formula if ongoing updates are required.
  • The formula result will not spill: For SEQUENCE, look for existing values or merged cells in the output area. A blocked spill range must be cleared before the array can expand.

Before deleting the original data, keep a copy or verify the new column. For a sequence, check the first value, last value, number of entries, and difference between consecutive values. These checks catch common errors such as a copied number instead of an incremented one or an unintended text result.

Flash Fill versus other number-sequence tools

The right method depends on what the numbers represent. Flash Fill is pattern recognition for shaping data. Fill Series and the fill handle are convenient for a fixed list. SEQUENCE is suited to a dynamic array with an explicit row count and step. A copied formula is useful when the workbook must work in older Excel versions or when each result needs to depend on a cell value.

For example, if you have invoice IDs and want to extract their numeric suffixes, Flash Fill may be a quick cleanup option, but a formula can be more repeatable when the source changes. If you need invoice numbers 5001 through 5100, use SEQUENCE or Series rather than asking Flash Fill to guess. If the required increment is irregular, such as a list of selected account codes, neither a standard arithmetic series nor a guessed pattern is appropriate; enter the values or use a source list that defines them.

Frequently Asked Questions

Can Flash Fill create 1, 2, 3, 4 in Excel?
It may recognize the examples and suggest a continuation, but it is not the dependable tool for creating a numeric series. Use the fill handle with two starting values, Home > Fill > Series, or =SEQUENCE(4) in Excel 2021 or Microsoft 365.

What is the shortcut for Flash Fill?
In Excel for Microsoft 365 on Windows, press Ctrl+E. You can also choose Data > Flash Fill. On Mac, use the ribbon command if the shortcut is unavailable or behaves differently on your keyboard.

Why does Flash Fill repeat my number instead of counting?
If you provide only one starting value, Excel may interpret the task as copying that value. For a predictable increment, enter two seed values and use the fill handle, or specify the step with Series or SEQUENCE.

Does Flash Fill update when I change the source?
No. Flash Fill writes results into cells; it does not create a live formula relationship. Run it again after changes or use formulas when outputs need to recalculate automatically.

Can Flash Fill keep leading zeros?
It can reproduce a pattern that includes zeros, but an identifier such as 007 can be treated as text or displayed as a number without its zeros. Check the output carefully and use text or a suitable number format when those zeros are significant.

Choosing the right method

For a sequence with a known start, step, and length, choose SEQUENCE in a supported Excel version or use Series and the fill handle for a fixed list. Choose a copied formula when compatibility or cell-by-cell calculation matters. Choose Flash Fill when you want Excel to imitate a demonstrated transformation of existing data, then review its output. Matching the tool to the job makes number lists more predictable and helps prevent a guessed pattern from being mistaken for a controlled sequence.

Related

Try it: the Date Difference Calculator: days, months, years and weekdays between two dates, with the DATEDIF formulas.

More in How-to basics

Sources: Function behaviour and menu paths: Microsoft Support documentation for Excel. Method & sources

Spotted an error in this guide? Let us know.