Often, our data comes to us in ways that are better for calculating than they are for reading. One example of this is a standard data table that repeats headers and labels for each row. When we are sorting, alphabetizing, and filtering, this format is incredibly useful. However, when we want to read a summary of the information, these tables are difficult to work with. Sometimes, it is better to have all the options in a table listed in a comma-separated list rather than broken out across many rows. Unfortunately, Excel doesn’t have a simple function to make this possible. Here is a quick set of data manipulation steps that will build a comma-separated list in a single cell from multiple rows of data…
Examine the Data and the Objective
Let’s look at an example data set… In this case, we have a list of all the Makes and Models of cars available in the U.S. for 2014. They are stored in a table with a separate row for each model, so the make of the car is repeated in each row as well.
What we want is a single row for each make of vehicle with a list of models after it, separated by commas. It should look like this:
The steps that follow will show you how to get to this result.
Get the latest Excel tips and tricks by joining the newsletter!
Andrew Roberts has been solving business problems with Microsoft Excel for over a decade. Excel Tactics is dedicated to helping you master it. You can read more of his writing on his personal blog at NapkinMath.io.
Join the newsletter to stay on top of the latest articles. Sign up and you'll get a free guide with 10 time-saving keyboard shortcuts!
Other posts in this series...
- VLOOKUP with Multiple Values or Criteria Using INDEX and MATCH (How To)
- Faster Multiple Criteria Lookups with VLOOKUP and CONCATENATE
- Extract a List of Values Filtered by Criteria with Sub-Arrays
- How to Combine (Concatenate) Data from Multiple Rows into One Cell
- How to Unpivot Columns into Rows in Excel Using Power Query