Get our FREE VBA eBook of the 30 most useful Excel VBA macros.

Automate Excel so that you can save time and stop doing the jobs a trained monkey could do.

Claim your free eBook

Power Query – Split delimited cells into rows

0023 - Split delimited cell into rows - featured image

This is the first of two posts showing how to split and combine rows from/to delimited cells.  In days gone by, it would take a long time for us to resolve these scenarios.  But with Power Query, it’s now a quick and easy process, which can be updated with a simple refresh.

In this first part, we’ll look at how to split delimited cells into rows with Power Query.

Download the example file

I recommend you download the example file for this post.  Then you’ll be able to work along with examples and see the solution in action, plus the file will be useful for future reference.

Download Icon
Download the file: 0023 Split delimited cells into

Watch the video:

Watch the video on YouTube


Let’s start by looking at our data scenario.

Source data format

The data contains a list of employees, along with any equipment that has been allocated to them by the company.  Looking at Anna Watkins in row 3, we can see that she has a laptop, access card, phone, and home printer.  Each piece of equipment is separated by a semi-colon and a space.

The attributes of each item are also recorded.  For example, Anna Watkins’ laptop has an ID number of ID0011, and an access card with the number 231, etc.  The item is separated from its attribute with a colon and as space.

While the format is useful for quickly seeing all employees, it’s not ideal if we want to know who has a specific item.  For example, who has a company credit card? Or who has which phone number?

The following format is more usable from a data manipulation perspective.

Data loaded back into Excel

If we had this format, we could easily filter the Equipment column and identify the individuals with a company credit card, or even create an employee telephone list.

We’re going to use Power Query to quickly convert our source data into this format.

While Power Query is the best option for this type data manipulation, other methods exist for splitting cells, which you can read about here:

Load data into Power Query

To start, we need to get the data in Power Query.  Select any cell within the table, then click Data -> From Table / Range.

Data from Table Range

The Power Query Editor will open, showing the data from the table.

Data loaded into Power Query

OK, we’re now ready for the magic to begin:

  1. We’ll split the Equipment column into rows, using the semi-colon and space to determine where to split.
  2. Next, we’ll split by a colon and space to create separate columns for equipment and its attribute.

Split into rows

OK, let’s split the Equipment column into rows.

  1. Select the Equipment column by clicking on the column header.
  2. Click Home -> Split Column (drop-down) -> By Delimiter.Select the data then Split by Delimiter
  3.   In the example we’re working through, each piece of equipment is separated by a semi-colon and a space.  This is not in the default delimiter list, so we need to select Custom from the drop-down, then in the box below, enter a semi-colon ( ; ) followed by a space.  Choose the option to split at each occurrence of the delimiter.
    Split Column by Delimiter dialog box
  4. Expand the available options by clicking Advanced options, then select the Rows.
  5. Click OK to execute the transformation.

The data now looks like this:

Data after splitting column into rows

We’ve managed to split the data into individual rows.  The individual’s name exists multiple times, as it is against each piece of allocated equipment.  In many circumstances this will be all that’s required.  However, for our scenario, we’ve got an extra step.

Split a column into columns

Now it’s time to separate the equipment from its attribute.

As before, click Home -> Split Column (drop-down) -> By Delimiter to open the Split Column by Delimiter dialog box.

Instead of splitting into rows, we can split into columns.  Our delimiter is a colon ( : ), followed by a space.

Split Column by Delimiter into columns

Click OK to split the Equipment column.

Rename the columns

Finally, rename the columns, so they have useful names; double-click on each column header and enter the name for the column (I’ve gone with Equipment and Equipment Attribute).

The preview window now looks like this.

Sample data after splitting completed

Load data into Excel

Everything is complete, so we are ready to push the table back into Excel.  Click Home -> Close & Load (drop-down) -> Close and Load To…

Home Close and Load To

The Power Query Editor will close, and the view returns to Excel.  In the Import Data dialog box, select to load a table into the existing worksheet and select cell E1.

Import Data into same worksheet

Click OK to close the Import Data dialog box.

The final data is now in Excel.

Data loaded back into Excel

If there are any changes to the original data, we can simply right-click on the table and select Refresh from the menu.


Power Query is an amazing tool.  Splitting cells just isn’t available using the regular Excel interface.  We would have to use a macro, or some extraordinarily complex formulas.  However, with Power Query, we can split delimited cells with just a few clicks.

Headshot Round

About the author

Hey, I’m Mark, and I run Excel Off The Grid.

My parents tell me that at the age of 7 I declared I was going to become a qualified accountant. I was either psychic or had no imagination, as that is exactly what happened. However, it wasn't until I was 35 that my journey really began.

In 2015, I started a new job, for which I was regularly working after 10pm. As a result, I rarely saw my children during the week. So, I started searching for the secrets to automating Excel. I discovered that by building a small number of simple tools, I could combine them together in different ways to automate nearly all my regular tasks. This meant I could work less hours (and I got pay raises!). Today, I teach these techniques to other professionals in our training program so they too can spend less time at work (and more time with their children and doing the things they love).

Do you need help adapting this post to your needs?

I'm guessing the examples in this post don't exactly match your situation. We all use Excel differently, so it's impossible to write a post that will meet everybody's needs. By taking the time to understand the techniques and principles in this post (and elsewhere on this site), you should be able to adapt it to your needs.

But, if you're still struggling you should:

  1. Read other blogs, or watch YouTube videos on the same topic. You will benefit much more by discovering your own solutions.
  2. Ask the 'Excel Ninja' in your office. It's amazing what things other people know.
  3. Ask a question in a forum like Mr Excel, or the Microsoft Answers Community. Remember, the people on these forums are generally giving their time for free. So take care to craft your question, make sure it's clear and concise.  List all the things you've tried, and provide screenshots, code segments and example workbooks.
  4. Use Excel Rescue, who are my consultancy partner. They help by providing solutions to smaller Excel problems.

What next?
Don't go yet, there is plenty more to learn on Excel Off The Grid.  Check out the latest posts:

6 thoughts on “Power Query – Split delimited cells into rows

  1. Jennifer Kincaid says:

    That was incredibly cool! I am definitely not a Visual Basic coder, so the discovery of Power Query was like a miracle. You did an excellent job of relaying a step-by-step process to successfully create rows from multiple data entries in a cell. My hero.

    • Excel Off The Grid says:

      Thanks Jennifer – I’m glad I could help. I agree that Power Query is a miracle, I think it has replaced 75% of my VBA coding.

  2. Charles Johnson says:

    I have data that uses a semicolon as the delimiter.

    I can split that into separate rows as described in this post, but, I need also to retain the original data and have the split of that data in the rows below it.

    Struggling to achieve this! Any help greatly appreciated.

    Thanks in advance.

    • Excel Off The Grid says:

      I would try:
      – Duplicate the column
      – Find & replace on duplicated column to change “;” for something else, e.g. “|”
      – Merge the two columns back together
      – Split the merged column based on the “|”
      That should get you pretty close.

Leave a Reply

Your email address will not be published. Required fields are marked *