Split a CSV into One File per Column Value
Sometimes the right way to divide a table is by what is in it rather than by how long it is: one file per customer, per account code, per store or per month, ready to send to the person who owns that slice.
Grouping stays on your device. The splitter reads your table locally rather than sending it to a server. Look over the grouped files before sharing them.
Steps
- Open the Split CSV tool and load the file.
- Select the option to split by a column's values.
- Pick the column to group on from the list of headers.
- Run the split. Each distinct value becomes its own file inside the zip, named after your file and the value, such as orders-West.csv.
- Spot check a couple of files to make sure each one only holds rows with its value.
Good to know
Tidy the grouping column first
Grouping is exact, so values that differ only in spacing or capitals, like "North" and "north ", stay separate groups. Cleaning that column beforehand gives you fewer, cleaner files. Quotes in the middle of a cell are read as ordinary text; only a leading quote opens a quoted cell. Should a warning say the file finishes with a quote still open, compare rows in against your expectations.
File names
Characters that are not allowed in file names, accented letters included, become an underscore. Spaces, dots and underscores at the ends are trimmed, and the value part of each name is cut to 60 characters. When two values end up with the same name, the later one gets a -2 suffix, so the North and north groups above arrive as orders-North.csv and orders-north-2.csv. There are no naming options in this version.
Empty cells
Rows where the chosen column is empty land in a file of their own ending in -(empty), and a value made only of spaces gets its own file, separate from that one, while a real value of "blank" gets -blank. A value with no usable characters at all, such as "???", goes to -(other). Look at these files before discarding them.
Splitting by month
If you want one file per month but only have full dates, add a helper column with just the year and month, then split on that column.
Questions
What if the column has thousands of different values?
The tool stops with a message if a split would create more than 1,000 files. Pick a column with fewer groups, or split by rows instead.
Do rows keep their original order inside each file?
Yes. Within each group, rows appear in the same order as in the source.
Is the header included in each file?
Yes, every output file starts with the same header line as the original.
Have bank statements as PDFs instead? RowSmith converts text-based PDF statements to CSV or Excel in your browser.
This guide was written with AI assistance and reviewed against the tool's behaviour. Always review your output before using it.
RowSmith is an independent tool and is not affiliated with any bank or software company.