The Splitter.SplitTextByEachDelimiter function in Power Query splits text using a list of delimiters, one after the other. It cuts at the first delimiter in the list, then the second, and so on, and anything after the last one stays together.
That makes it handy for text that follows a pattern, like “Last, First – Department” or a full address. Below, I’ll show you how it works, including splitting from the end and what happens when a delimiter is missing.
Follow along with the example file
Splitter.SplitTextByEachDelimiter Function Examples.xlsx
Splitter.SplitTextByEachDelimiter Function Syntax
Splitter.SplitTextByEachDelimiter(delimiters as list, optional quoteStyle as nullable number, optional startAtEnd as nullable logical) as function
- delimiters – a list of delimiters, such as
{", "," - "}. Each one is used once, in the order you list them. You can repeat the same delimiter in the list, and every delimiter is case-sensitive and can’t be empty. - quoteStyle (optional) – whether double quotes matter.
QuoteStyle.Csvtreats text inside quotes as one piece, andQuoteStyle.Nonetreats quotes as ordinary characters. If you leave it out, quotes are respected, same asQuoteStyle.Csv. - startAtEnd (optional) – set it to
trueto start from the end of the text instead of the beginning. Then the first delimiter in the list is the last one in the text.
What it returns – a function. That function takes a text value and returns a list of text, one item for each piece.
So the function doesn’t split anything by itself. It builds a splitter, and you either pass that splitter to another function (like the Table.SplitColumn function) or call it on a text value yourself.
The Splitter.SplitTextByEachDelimiter function is part of the Power Query M language, so you can use it in Power Query in Excel and in Power BI. I’ve tested all the examples below in Excel for Microsoft 365.
When to Use the Splitter.SplitTextByEachDelimiter Function
Use this function when you need to:
- Split text that uses different delimiters in a fixed order, like a comma and then a hyphen
- Split at only the first few delimiters and keep the rest of the text together
- Split an address into street, city, state, and ZIP code
- Split at the last space or the last delimiter, like separating the last name from a full name
- Split values that contain quote marks used as inch symbols
Example 1: Split a Text Value Using Two Delimiters
Let’s start with a single value, so you can see exactly what the splitter does.
Suppose you have the invoice code “INV-2026/0458” and you want the type, year, and number as separate items.
Create a new blank query (Data > Get Data > From Other Sources > Blank Query) and use this formula:
= Splitter.SplitTextByEachDelimiter({"-","/"})("INV-2026/0458")
Result: a list with INV, 2026, and 0458

Notice the two sets of parentheses. Splitter.SplitTextByEachDelimiter({"-","/"}) creates a splitter, and the second pair of parentheses runs that splitter on “INV-2026/0458”.
The splitter first cuts at the hyphen, which gives you INV. Then it looks for the slash in the rest of the text and cuts there, which gives you 2026 and 0458.
In real work, you’ll mostly pass the splitter to another function, as in the next example. Calling it on one value like this is a quick way to check what it does.
If your text uses the same delimiter all the way through and you want to split at every one, the Splitter.SplitTextByDelimiter function is the simpler choice. This function is for when the delimiters change or you want to stop after a set number of splits.
Example 2: Split a Column at Two Different Delimiters
This is where you’ll use this function most, inside the Table.SplitColumn function.
Below is an Excel table named Staff where each entry has the last name, the first name after “, “, and the department after ” – “. I want to split the Staff Entry column into Last Name, First Name, and Department columns.

To follow along, select any cell in the table and go to Data > From Table/Range to open it in the Power Query Editor. If Power Query adds a Changed Type step, use #"Changed Type" in place of Source in the formulas below.
Add a new step (by clicking on the fx icon next to the formula bar) and use this formula:
= Table.SplitColumn(Source,"Staff Entry",Splitter.SplitTextByEachDelimiter({", "," - "}),{"Last Name","First Name","Department"})
Result: Last Name, First Name, and Department columns, so “Jones, Madison – Sales – East” becomes Jones, Madison, and Sales – East

Here, the Table.SplitColumn function hands every Staff Entry value to the splitter. The splitter cuts at the first “, ” and then at the first ” – ” after it, and the list {"Last Name","First Name","Department"} names the three new columns.
Look at the rows for Madison Jones and Benjamin Hayes. Their department has its own ” – “, but it stays in one piece, because each delimiter in the list is used only once.
Power Query also has the Splitter.SplitTextByAnyDelimiter function, which treats the delimiters in the list as interchangeable and splits at every one it finds. With the same list, it would cut “Sales – East” in two and push “East” into a fourth piece.
Example 3: Use the Same Delimiter More Than Once
You can put the same delimiter in the list more than once, and this is great for addresses.
Below is an Excel table named Addresses where each address has the street, city, and state with ZIP code separated by a comma and a space. I want to split the Address column into Street, City, State, and ZIP columns.

Load the Addresses table into Power Query the same way as in Example 2. Then add a new step and use this formula:
= Table.SplitColumn(Source,"Address",Splitter.SplitTextByEachDelimiter({", ",", "," "}),{"Street","City","State","ZIP"})
Result: Street, City, State, and ZIP columns, so “418 Oak Street, Springfield, IL 62704” becomes 418 Oak Street, Springfield, IL, and 62704

The list has “, ” twice and then a single space. So the splitter cuts at the first comma, then at the second comma, and then at the first space after that, which sits between the state and the ZIP code.
The spaces in “418 Oak Street” or “River Bend Drive” don’t cause a problem. The splitter only starts looking for a space after it has used both commas.
The ZIP column holds text, not numbers. That’s usually what you want for ZIP codes, because a number type would drop leading zeros from codes like 02108.
Example 4: Split the First Few Words and Keep the Rest Together
This next one comes up a lot with log files and exported notes.
Below is an Excel table named SystemLog where each log entry starts with a date, a time, and a level, followed by a message, all separated by spaces. I want Date, Time, Level, and Message columns, with the full message in one column.

Load the SystemLog table into Power Query the same way as in Example 2. Then add a new step and use this formula:
= Table.SplitColumn(Source,"Log Entry",Splitter.SplitTextByEachDelimiter({" "," "," "}),{"Date","Time","Level","Message"})
Result: Date, Time, Level, and Message columns, so the first entry becomes 2026-03-14, 09:30:12, ERROR, and Disk quota exceeded on drive D

The list has three spaces, so the splitter cuts at the first three spaces only. Everything after the third space goes into the Message column, spaces and all.
If you split at every space instead (for example, with the Text.Split function), each message would be cut into separate words. So repeating a delimiter in the list is a simple way to split at only the first few.
All four new columns hold text. If you need a real date and time, change the Date and Time column types after the split.
Example 5: Split at the Last Space
So far, every split has started from the left. Sometimes the part you want is at the end of the text.
Below is an Excel table named Members with full names, where some people have a middle name and some don’t. I want the last name in its own column and everything before it in a First Name column.

Load the Members table into Power Query the same way as in Example 2. Then add a new step and use this formula:
= Table.SplitColumn(Source,"Full Name",Splitter.SplitTextByEachDelimiter({" "},QuoteStyle.Csv,true),{"First Name","Last Name"})
Result: First Name and Last Name columns, so “Susan Nicole Miller” becomes Susan Nicole and Miller

The third argument, true, makes the splitter start from the end of the text. So it cuts at the last space, and the last name always lands in the Last Name column, with or without a middle name.
Any middle name stays with the first name, so the First Name column shows Susan Nicole for the first row.
The second argument, QuoteStyle.Csv, is just the default quote setting. You have to put something there to get to the third argument, and null works the same way.
Without true, the splitter would cut at the first space instead. Then “Susan Nicole Miller” would give you Susan and Nicole Miller, which puts the middle name in the wrong column.
Example 6: Split at Two Delimiters From the End
When you start from the end with more than one delimiter, the order of the list matters.
Below is an Excel table named ReportFiles with file names made of a report name, a version number, and a file extension. Each report name has a ” – ” of its own (like Budget – North), and I want Report, Version, and Extension columns.

Load the ReportFiles table into Power Query the same way as in Example 2. Then add a new step and use this formula:
= Table.SplitColumn(Source,"File Name",Splitter.SplitTextByEachDelimiter({"."," - "},QuoteStyle.Csv,true),{"Report","Version","Extension"})
Result: Report, Version, and Extension columns, so “Budget – North – v2.xlsx” becomes Budget – North, v2, and xlsx

Starting from the end, the splitter uses the first delimiter in the list first. It cuts at the last period, which gives you the extension, and then at the last ” – ” before that, which gives you the version.
So with true, you list the delimiters from right to left, in the order the splitter meets them. The pieces still come back in normal left-to-right order, which is why Report, Version, and Extension are named in that order.
Everything that’s left goes to the Report column, so “Budget – North” keeps its own ” – “.
Example 7: What Happens When a Delimiter Is Missing
Real data isn’t always this tidy, so it helps to know what the splitter does with a value that doesn’t fit the pattern.
Below is an Excel table named Invoices with invoice codes that should look like INV-2026/0458, but two of them were typed differently. I want to split the Invoice Code column into Type, Year, and Number columns.

Load the Invoices table into Power Query the same way as in Example 2. Then add a new step and use this formula:
= Table.SplitColumn(Source,"Invoice Code",Splitter.SplitTextByEachDelimiter({"-","/"}),{"Type","Year","Number"})
Result: Type, Year, and Number columns, where “INV2026/0460” stays whole in the Type column with null in Year and Number, and “INV-2026” gives INV and 2026 with null in Number

The splitter works through the list in order, and it stops at the first delimiter it can’t find. “INV2026/0460” has no hyphen, so nothing gets split, even though the slash is there.
“INV-2026” has the hyphen but no slash. So you get the first split, and the Number column is null because there’s no third piece.
Important: A missing delimiter doesn’t cause an error, so these rows are easy to miss. After the split, filter the last of the new columns (Number here) for null to find any values that didn’t match the pattern.
Example 8: Fix Rows That Don’t Split Because of an Inch Mark
The default quote handling can cause trouble when a double quote in your data isn’t really a quote.
Below is an Excel table named Supplies where each supply line has an item, a material, and a quantity separated by ” – “. Some items use a double quote as the inch symbol, like Pipe 3/4”, and I want Item, Material, and Qty columns.

Load the Supplies table into Power Query the same way as in Example 2. Then add a new step and use this formula:
= Table.SplitColumn(Source,"Supply Line",Splitter.SplitTextByEachDelimiter({" - "," - "}),{"Item","Material","Qty"})
Result: the rows without an inch mark split fine, but “Pipe 3/4″ – Copper – 10” ends up as Pipe 3/4 – Copper – 10 in the Item column, with null in Material and Qty

The splitter respects quotes by default, so it reads the inch mark as the start of a quoted piece. Since there’s no closing quote, the rest of the text is treated as one piece, and the inch mark itself is removed.
To fix this, tell the splitter to treat quotes as ordinary characters. Use this formula instead:
= Table.SplitColumn(Source,"Supply Line",Splitter.SplitTextByEachDelimiter({" - "," - "},QuoteStyle.None),{"Item","Material","Qty"})
Result: every row splits into Item, Material, and Qty, so the first row becomes Pipe 3/4″, Copper, and 10

With QuoteStyle.None, the double quote is just another character. The inch mark stays in the Item column, and each row splits at both ” – ” delimiters.
Use QuoteStyle.None only when your data has no quoted values that need to stay together. If a value like “Pipe – Large” sat inside quotes to protect its ” – “, this setting would split it anyway.
Other Excel Articles You May Also Like:
- Text.BeforeDelimiter – Use Text.BeforeDelimiter in Power Query M to get text before a delimiter.
- Text.AfterDelimiter – Use Text.AfterDelimiter in Power Query M to get text after a delimiter.
- Text.BetweenDelimiters – Use Text.BetweenDelimiters in Power Query M to extract text between delimiters.
- Table.FromList – Use Table.FromList in Power Query M to turn a list into a table.
- Combiner.CombineTextByDelimiter – Use Combiner.CombineTextByDelimiter in Power Query M to join text.
- Table.ExpandListColumn – Use Table.ExpandListColumn in Power Query M to turn lists into rows.
- Text.TrimEnd – Use Text.TrimEnd in Power Query M to remove trailing spaces or characters.
- Text.Range – Use Text.Range in Power Query M to extract part of a text value.