Excel Flash Fill for Rows: How It Works and When to Use It

How-to basics · Updated November 19, 2026

In Excel for Microsoft 365 on Windows, Flash Fill recognizes a pattern from examples and fills matching values down a column; enter an example, select the next cell, and press Ctrl+E or choose Data > Flash Fill. If you mean filling cells horizontally across one worksheet row, Flash Fill is not the best tool for that job: arrange records vertically, transpose the data, or use a formula instead.

What “Flash Fill a row” can mean

The phrase can describe two different tasks. You might want Excel to make a new result for every record, with each record occupying a worksheet row. For example, you could extract a first name from every full name in column A and put the results in column B. Flash Fill is suited to this pattern: it creates a value in the output column for each corresponding source row.

Alternatively, you may mean filling cells from left to right within one worksheet row—for example, turning a full name in A2 into a first name in B2 and a last name in C2, then continuing across that same row. Flash Fill is designed primarily around examples arranged in columns, not as a general horizontal fill command. It may not infer a left-to-right pattern reliably. If the source data is laid out horizontally, use formulas or rearrange it before trying Flash Fill.

This distinction matters because Excel’s ordinary rows represent records, while its columns usually hold fields such as first name, last name, or date. Flash Fill is easiest to understand when each record is on its own row and the new result goes into a separate column.

How Flash Fill recognizes a pattern

Flash Fill examines the example you type and the nearby data to infer what transformation you want. Suppose A2 contains Maya Chen and you type Maya in B2. The entry suggests that the desired output is the text before the space. Excel may preview similar results for the names below. Press Enter to accept the suggestion; if no preview appears, use the Flash Fill command or shortcut.

It is a pattern-recognition feature, not a formula-writing tool. Flash Fill does not provide a visible rule that you can inspect or adjust. It creates values in the destination cells, rather than formulas that recalculate from the source. That can be convenient for a one-time cleanup, but it means a later edit to A2 will not automatically change the corresponding result in B2.

One example is often enough for a simple, unambiguous pattern, but two or more examples can help when the transformation has several possible interpretations. For instance, an entry of 03/04/2026 could be read as March 4 or April 3 depending on regional date conventions. More examples can clarify the intended output, but they cannot guarantee a correct interpretation of inconsistent or ambiguous source data.

Steps to use Flash Fill in Excel

  1. Put the source values in a column, with one record per row, and leave an adjacent column for the results. Add a clear header to each column if that helps identify the data.
  2. In the first output cell, type the result you want for the first source value. For example, if A2 contains Maya Chen, type Maya in B2.
  3. Move to the next output cell, such as B3. If Excel displays a preview for the remaining rows, check that it follows the intended pattern.
  4. Press Enter to accept the preview. To request Flash Fill directly, select the output cell or range and press Ctrl+E on Windows, or choose Data > Flash Fill on the ribbon.
  5. Check a few results—including unusual names, blank source cells, and values with extra spaces—before relying on the completed column.

You can also select the cells where you want results and choose Data > Flash Fill. The command is useful when Excel has not displayed an automatic preview. If the command is unavailable or does not fill the expected cells, check that the workbook is open in the desktop app, that the source examples are nearby, and that the destination range is arranged as a column.

On Excel for Mac, use Data > Flash Fill if the keyboard shortcut differs on your keyboard or in your version. Excel for the web does not provide the same desktop Flash Fill command, so use a formula or open the workbook in the desktop app. Ribbon labels and available features can vary by platform and update.

What to do when the data runs across a row

If the source values are in A1, B1, and C1 and you want transformed results in the row beneath or beside them, first decide whether the data actually represents separate records or separate fields. Flash Fill works most predictably when each record is a row and each field is a column. If the values are records arranged across columns, you can copy the range and use Paste Special > Transpose to switch rows and columns, then apply Flash Fill to the resulting column. Transposing changes the layout, so make a copy first if the original arrangement must be preserved.

For a small one-row task, typing the results or using a formula in each destination cell may be simpler than rearranging the sheet. For example, if A2 contains a full name and you want its first part in B2, with the source in A2, enter =TEXTBEFORE(A2," ") in B2. For Maya Chen, the result is Maya. This formula returns text before the first space; names with middle names or different spacing need additional thought. TEXTBEFORE is available in Microsoft 365 and Excel 2024, but not every older Excel version.

Another option is to convert the layout into a table-like structure: place each person or item on a separate row, with the original value in one column and the desired output in another. This makes it easier to inspect the relationship between source and result, repeat the process, and use sorting or filters without confusing fields with records.

Useful examples and when Flash Fill fits

Flash Fill is handy for straightforward text reshaping when you can show Excel a clear example. Common uses include separating names, combining text from two columns, extracting a code from a consistently formatted ID, or changing a display format. For instance, if column A contains 415-555-0182 and you type (415) 555-0182 in the neighboring output column, Excel may recognize the formatting pattern for other similarly structured phone numbers.

  • Extracting text: Type a first name or product code from the source value, then inspect whether the preview extracts the same part from other rows.
  • Combining fields: If first and last names are in separate columns, type the desired combined name in a neighboring column. Check for blank fields and unwanted spaces.
  • Reformatting: Provide a fully formatted example, such as a phone number with parentheses. The source values should have consistent components for the pattern to be dependable.
  • Cleaning identifiers: If a code has a stable prefix or separator, demonstrate the exact portion you want. Verify codes with different lengths or prefixes individually.

These are suggestions, not guarantees. Flash Fill may produce plausible-looking output that is wrong when the source data contains exceptions. A name with a hyphen, an ID with a different number of characters, or a phone number with an international prefix can break an otherwise consistent pattern. Treat the preview as a proposal to review, not proof that every row is correct.

Common problems and how to fix them

If Flash Fill does nothing, first check the arrangement. Put source examples in one column and the intended results in a nearby column, with the first example on the same row as its source. Type a result rather than leaving the destination blank, then try Data > Flash Fill or Ctrl+E. Selecting a destination cell far from the source can make it harder for Excel to identify the relationship.

If the preview is wrong, add another example that shows how to handle the difficult cases, then try again. Check whether the source values use consistent separators and whether spaces at the start or end of cells are affecting the pattern. If exceptions need different treatment, it may be safer to fix them separately or use a formula with explicit rules rather than accept one broad guess.

If only some rows fill, look for blank cells, hidden irregularities, or a change in the source format partway down the list. Review the first, middle, and last results, plus any outliers. You can undo a just-completed Flash Fill with Ctrl+Z on Windows, but if you have made further changes, inspect the output and correct it directly rather than assuming the entire column followed one consistent rule.

Also check whether the result is the right data type. A code beginning with zero may lose that zero if Excel interprets the output as a number. Dates can be interpreted according to regional settings, and number-like text can be reformatted. If the exact characters matter, set the destination cells to Text before filling or inspect the results and correct any conversion.

Flash Fill compared with formulas and Fill

Use Flash Fill for a quick, mostly one-time transformation when the pattern is easy to demonstrate and you want fixed results. Use a formula when results should update as source cells change, when the transformation needs explicit logic, or when you need to audit how each result was produced. Formulas can also be filled down a column and recalculated, unlike Flash Fill’s static output.

For example, with a full name in A2, =TEXTBEFORE(A2," ") returns the text before the first space in versions that support TEXTBEFORE. If A2 contains Maya Chen, it returns Maya. If you change A2 to Maya Patel, the formula result updates. The formula still assumes the first space separates the part you want; it does not automatically solve every naming convention.

Excel’s Fill commands are different. Home > Fill > Down copies a cell’s contents or formula down a selected range; it does not infer a text transformation from an example. Flash Fill tries to infer that transformation. For repeatable imports, complex cleanup, or large and inconsistent datasets, Power Query may be a better fit because its recorded transformation steps can be refreshed. Choose the simplest method that gives you results you can verify.

Important limitations before you rely on it

Flash Fill produces values, so it does not preserve a live link to the source. If source data changes regularly, a formula or refreshable data-cleaning process is usually more appropriate. It can also be difficult to maintain a Flash Filled column because the transformation is not documented in the cell as a formula. Add a header or a short note if another person will need to understand how the values were made.

Flash Fill is not a substitute for validating data. It does not know whether a result is a valid email address, whether a date is genuine, or whether a company’s ID rules have been followed. Review sensitive identifiers and important records carefully. Keep the original column until you have checked the output, and save a copy before making a large cleanup if the source data is valuable.

For a stable, simple pattern, Flash Fill can save repetitive typing. For ambiguous data, frequently changing inputs, or a task that must be repeatable, prefer a method with explicit rules. The right choice depends less on whether Flash Fill can generate a preview and more on whether you can confidently verify its results.

Frequently Asked Questions

Can Excel Flash Fill work horizontally across a row?

Flash Fill is designed primarily for patterns in columns, so it is not a dependable left-to-right row-filling tool. If your records run horizontally, transpose the data or use formulas or manual entry. If by “row” you mean one output for each record row, Flash Fill can fill the results down an adjacent column.

What is the shortcut for Flash Fill in Excel?

In Excel for Microsoft 365 on Windows, press Ctrl+E to run Flash Fill. You can also choose Data > Flash Fill. On a Mac, use the ribbon command if the shortcut is different in your setup; Excel for the web does not offer the same desktop command.

Why is Flash Fill not working?

It may not see a clear pattern, the example may be too far from the source data, or the values may have inconsistent formats. Enter an example in the adjacent output column, add another example if needed, and choose Data > Flash Fill. Check that you are using desktop Excel rather than Excel for the web.

Does Flash Fill update when the source changes?

No. Flash Fill writes values, not formulas, so later edits to the source do not automatically update the filled result. Use a formula when you need a live connection between source and output, or run Flash Fill again after updating the source and review the new results.

Can I use Flash Fill to split names into columns?

Yes, when names are arranged one per row in a source column and the desired parts go into neighboring output columns. Type an example of the part you want, then use Flash Fill and check names with middle names, suffixes, hyphens, or other exceptions. A simple first-space pattern may not handle every naming convention correctly.

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.