sturdybits

Guides / Split Sheets

How to split an Excel sheet into multiple files by column value

30 November 2026

To split an Excel sheet into one file per value in a column, such as one file per region or manager, filter the sheet to one value, copy the rows it shows into a new workbook and save it, then repeat for the next value. Excel has no button that does every value in one go, so for more than a handful of files people use a VBA macro or a tool built for the job.

Whichever way you do it, check what each file carries with it: a copied workbook can hold everyone else's rows in places you can't see.

Before you start

Tidy the column you're splitting by. A typo such as "Nrth" makes a file of its own. To see every value in the column, open its filter drop-down, or in Microsoft 365 and Excel 2021 or later use =UNIQUE(B2:B500) in a spare cell.

Power Query can't do this on its own: it can filter a table into one query per value, but it loads them into the same workbook, not separate files.

1. Filter and copy, one value at a time

Good for: two or three files.

  1. Click in the data and choose Data > Filter.
  2. Use the arrow on the column heading to show only one value, such as North.
  3. Select the data, including the heading row, and press Ctrl+C. With a filter on, Excel copies only the rows the filter shows.
  4. Press Ctrl+N (Cmd+N on a Mac) for a new workbook, paste into A1, and save it as North.
  5. Go back, pick the next value, and repeat.

It's free, but slow for twenty values, easy to get wrong, and an ordinary paste doesn't bring the column widths. Rows hidden by hand, rather than by the filter, are copied too, unless you first choose Home > Find & Select > Go To Special > Visible cells only.

2. Use Advanced Filter to copy one value's rows

Good for: copying rows out without touching the filter on the original sheet.

  1. Somewhere outside the data, type the column's heading (for example Region) in one cell, and below it ="=North". Typed as plain North, Advanced Filter would also pick up "North East", because it matches text that begins with what you type.
  2. Go to the empty sheet you want the rows copied to. Excel only copies filtered rows to the sheet you're on.
  3. Choose Data > Advanced, then Copy to another location.
  4. Set List range to the data on the original sheet, Criteria range to your two cells, and Copy to to A1. Choose OK.
  5. Right-click the sheet tab, choose Move or Copy, pick (new book) under To book, and save the new workbook.

Change the value and repeat for the next file. It leaves the original sheet alone, but it's still one value at a time. Microsoft's guide to advanced criteria has the details.

3. Make every file at once with a VBA macro

Good for: Windows users who split the same sheet every week or month.

This macro filters the sheet to each value in your chosen column in turn, copies the rows into a new workbook and saves it next to the original, named after the value. Save your workbook, press Alt+F11, choose Insert > Module, paste the code, set KEY_COL to your column's number and press F5.

Sub SplitByColumn()
    Const KEY_COL As Long = 2              ' column to split by: 1 = A, 2 = B
    Dim src As Worksheet, data As Range, values As New Collection
    Dim r As Long, v As Variant, newBook As Workbook

    Set src = ActiveSheet
    Set data = src.Range("A1").CurrentRegion  ' headings in row 1, no blank rows

    On Error Resume Next                    ' skips duplicates, so each value is kept once
    For r = 2 To data.Rows.Count
        v = CStr(data.Cells(r, KEY_COL).Value)
        If v <> "" Then values.Add v, v
    Next r
    On Error GoTo 0

    src.AutoFilterMode = False              ' clear any existing filter
    Application.ScreenUpdating = False
    For Each v In values
        data.AutoFilter Field:=KEY_COL, Criteria1:="=" & v
        Set newBook = Workbooks.Add
        data.SpecialCells(xlCellTypeVisible).Copy newBook.Sheets(1).Range("A1")
        newBook.SaveAs src.Parent.Path & Application.PathSeparator & v & ".xlsx", xlOpenXMLWorkbook
        newBook.Close SaveChanges:=False
    Next v
    src.AutoFilterMode = False
    Application.ScreenUpdating = True
End Sub

Values that differ only in capitals, such as North and north, share a file, and rows with a blank in the column are left out. A value that can't be a file name, such as one with a slash, stops the macro, and dates don't always filter correctly, so it suits text such as regions or names. Formulas that refer to other sheets become links back to the original workbook.

Check what each file carries along

The shortcut that looks quickest is to save a copy of the whole workbook for each person and delete everyone else's rows. That's where private data leaks:

Before sending a file, run File > Info > Check for Issues > Inspect Document. Microsoft's Document Inspector finds hidden rows, columns and sheets, and flags cached data in pivot tables, hidden names and links to other files, though you have to deal with those last ones yourself.

When a tool is quicker

Filtering and copying is fine for a few files. For a dozen regions every month, it's slow and easy to get wrong.

That's why we made Split Sheets. Drop in an .xlsx or CSV file and pick the column, and it shows every file it will make and how many rows each has. Each file is built fresh with the headings and only its own rows, so nothing from the other rows, hidden sheets or Excel's behind-the-scenes lists can come along. Fonts, colours, number formats, column widths, frozen headings and conditional formatting are kept. Formulas are replaced by their values, because a split file can't refer to rows that aren't in it, and charts, pictures and comments aren't copied. Rows with nothing in the column go into a "(blank)" file, and you download everything as a .zip, with each file named after its value, such as "Sales - North.xlsx".

It runs in your browser, and your file never leaves your computer. The free version makes up to 10 files at a time; Pro is £19 once and makes any number. You can try it with a sample file first. If you need pieces of a set size rather than one file per value, see how to split a large file into smaller files.

Quick answers

Can Excel split a sheet into multiple files automatically? Not with a built-in command. Filter and copy for a few values; for many, use a VBA macro or a tool that makes one file per value.

Does copying filtered rows include the hidden ones? Rows hidden by a filter aren't copied. Rows hidden by hand are, unless you select Visible cells only first.

Is it safe to send a copy of the workbook with the other rows deleted? Not without checking it. Pivot tables keep their own copy of the source data, and hidden sheets stay in the file. Build each file fresh, or run Document Inspector before you send it.