Skip to content
ArumSoft Learning
KO

    Everyday Excel Skills · Tutorial 3 of 14

    How to Use Flash Fill in Excel

    Split, combine and reformat text by typing one example and letting Flash Fill complete the column, and know when a formula is the better choice.

    Level
    Beginner
    Time
    9 min read
    Updated:
    Applies to:
    Excel for Microsoft 365, Excel 2021, Excel 2019, Excel for the web
    From one example, Flash Fill joined the name from column A with the department from column B in every row.
    Example: From one example, Flash Fill joined the name from column A with the department from column B in every row.

    What you'll learn

    • Fill a column from one typed example with Ctrl+E
    • Extract part of a text value, such as the name in an email address
    • Combine values from several columns into one
    • Correct Flash Fill when it guesses the wrong pattern
    • Choose between Flash Fill, a formula and Text to Columns

    Flash Fill fills a column by example. Type what you want for the first row, such as the name part of an email address or a name and department joined together, and Excel works out the pattern from the columns next to it and fills in the rest. There's no formula to write. The shortcut is Ctrl+E.

    Where to find it

    Data › Data Tools › Flash Fill, next to Text to Columns.
    • Ribbon: Data then Data Tools then Flash Fill, or Home then Editing then Fill then Flash Fill.
    • Keyboard: Ctrl+E.
    • Automatically: often you don't need either. When you start typing a second example and Excel sees the pattern, it shows the rest of the column in light gray. Press Enter to accept it, or keep typing to ignore it.

    Flash Fill is also in Excel for Mac and Excel for the web, on the Data tab.

    Fill a column from one example

    The contact list below has full email addresses in column C. Column D should hold only the part before the @.

    1. Type the first result

      Click D2, type ana.lopez and press Enter. Type it exactly as you want every result to look.

      ABCDE
      1NameDeptEmailUsernameName tag
      2Ana LopezSalesana.lopez@northwind.comana.lopez
      3Ben CarterFinanceben.carter@northwind.com
      4Chloe ParkITchloe.park@northwind.com
      5David MossSalesdavid.moss@northwind.com
      6Ella NunezHRella.nunez@northwind.com
      One example in D2: the part of Ana's email address before the @.
    2. Press Ctrl+E

      With D3 selected, press Ctrl+E. Excel fills D3:D6 and stops at the last row of the data.

    3. Check every result

      Read down the column. Flash Fill copies a pattern; it doesn't know what the data means, so a row that breaks the pattern can come out wrong.

      ABCDE
      1NameDeptEmailUsernameName tag
      2Ana LopezSalesana.lopez@northwind.comana.lopez
      3Ben CarterFinanceben.carter@northwind.comben.carter
      4Chloe ParkITchloe.park@northwind.comchloe.park
      5David MossSalesdavid.moss@northwind.comdavid.moss
      6Ella NunezHRella.nunez@northwind.comella.nunez
      Flash Fill took the pattern from D2 and filled D3:D6. The formula bar shows a plain value, not a formula.

    A small Flash Fill Options button appears next to the filled cells. Use it to undo the fill or to select the cells Flash Fill changed, so you can check or format them.

    Combine columns

    Flash Fill also joins values. Column E should read like a name tag: the name, then the department in parentheses.

    Click E2, type Ana Lopez (Sales) and press Enter, then press Ctrl+E.

    ABCDE
    1NameDeptEmailUsernameName tag
    2Ana LopezSalesana.lopez@northwind.comana.lopezAna Lopez (Sales)
    3Ben CarterFinanceben.carter@northwind.comben.carterBen Carter (Finance)
    4Chloe ParkITchloe.park@northwind.comchloe.parkChloe Park (IT)
    5David MossSalesdavid.moss@northwind.comdavid.mossDavid Moss (Sales)
    6Ella NunezHRella.nunez@northwind.comella.nunezElla Nunez (HR)
    From one example, Flash Fill joined the name from column A with the department from column B in every row.

    Flash Fill read the example, found "Ana Lopez" in A2 and "Sales" in B2, and repeated that arrangement, spaces and parentheses included, for every row.

    When Flash Fill guesses wrong

    One example can fit more than one pattern. If you type Mia as the first name from Mia Chen, the rule could be "the first word" or "the first three letters". Flash Fill picks one, and a row such as Christopher Hall shows which: Christopher or Chr.

    • Type a second example. Overwrite the first wrong result with the right value. Flash Fill uses it as another example and updates the cells below it.
    • Give more examples up front. Type two or three results before pressing Ctrl+E when the data is irregular, such as names with and without a middle name.
    • Excel can't see a pattern. If nothing happens or Excel says it can't find one, check that the column you're filling is right next to the data, then add another example and try again.

    Flash Fill, a formula or Text to Columns?

    Flash FillA formulaText to Columns
    How you set it upType an exampleWrite the logic, such as =LEFT(C2,FIND("@",C2)-1)Choose a delimiter in a wizard
    What ends up in the cellsPlain valuesFormulasPlain values
    When the source data changesNothing changes; fill againUpdates by itselfNothing changes; split again
    Best forOne-off cleanup, combining, reformattingData that keeps changing or arrivingSplitting at a delimiter into several columns at once

    =LEFT(C2,FIND("@",C2)-1) returns ana.lopez for the first contact, just like the Flash Fill example: FIND returns the position of the @, and LEFT takes everything before it. If new contacts arrive every week, the formula is the better choice; in Excel for Microsoft 365 and Excel 2024, =TEXTBEFORE(C2,"@") does the same job.

    Real-world scenarios

    Inventory

    Split product codes

    Every SKU holds a product type, a color and a size, separated by hyphens. Type GRY in B2 and press Ctrl+E, then type XL in C2 and press Ctrl+E again.

    ABC
    1SKUColorSize
    2HD-GRY-XLGRYXL
    3TS-BLK-MBLKM
    4TS-WHT-LWHTL
    5HD-NVY-SNVYS
    6CP-RED-OSREDOS
    Two examples in row 2 filled the color and size for every SKU, including the two-letter sizes XL and OS.

    The first example in C2 is the two-letter size XL, which makes the pattern clear: everything after the last hyphen. Starting from M in a row like TS-BLK-M would also fit "the eighth character", so check the longer sizes if you start there.

    School

    Homeroom labels from year and class

    A class list keeps the year and the class number in separate columns, but name cards need one label. Type Class 2-3 in D2 and press Ctrl+E.

    ABCD
    1NameYearClassHomeroom
    2Mia Chen23Class 2-3
    3Leo Grant23Class 2-3
    4Zoe Patel25Class 2-5
    5Sam Ortiz31Class 3-1
    6Ivy Brooks34Class 3-4
    Flash Fill built Class 2-3, Class 2-5, Class 3-1 and Class 3-4 from the numbers in columns B and C.

    The word "Class" matters: typed on its own, 2-3 would be read as a date. Flash Fill takes numbers from the source cells as easily as text.

    Personal

    Tidy up phone numbers

    Your contacts' numbers were saved as bare digits. Type the first one the way you like to read it, (212) 555-0147, in C2 and press Ctrl+E.

    ABC
    1ContactPhoneFormatted
    2Mom2125550147(212) 555-0147
    3Jun6465550199(646) 555-0199
    4Dr. Lee7185550123(718) 555-0123
    5Gym9175550168(917) 555-0168
    Each ten-digit number rewritten with the area code in parentheses and a hyphen.

    Flash Fill added the parentheses, the space and the hyphen in the same places for every number. The original digits stay in column B, so you can delete that column once you've checked the results.

    Common mistakes

    • A blank column between the data and the example. Flash Fill looks at the block of data your example sits in. Put the new column directly next to the data, or delete the empty column first.
    • Expecting the results to update. Flash Fill writes values. If an email address changes later, the username in column D stays as it was. Run Flash Fill again, or use a formula for data that changes.
    • Not checking irregular rows. Middle names, missing values and extra spaces are where Flash Fill goes wrong. Scan the column, or use the Flash Fill Options button to select the changed cells and look at them.
    • No gray preview while typing. Automatic suggestions can be turned off. Go to File then Options, choose Advanced and tick Automatically Flash Fill. Ctrl+E works either way.

    Practice

    Practice

    Clean a contact list with Flash Fill

    In a new sheet, type five full names in column A (include one with a middle name) and an email address for each in column B. Then:

    1. In C2, type the first name of the person in A2 and press Ctrl+E. Check the row with the middle name.
    2. In D2, type the last name and press Ctrl+E. If the middle-name row is wrong, type the correct value over it.
    3. In E2, type the email's domain (the part after the @) and fill the column.
    4. In F2, type the last name, a comma, a space and the first name, such as Lopez, Ana, and fill the column.
    5. Change one name in column A and notice that columns C to F don't update.

    Related

    Was this guide helpful? Spot a mistake? Send feedback · admin@arumsoft.com