0

I have a spreadsheet of Chamber of Commerce members that looks like this:

COMPANY              CATEGORY 1             CATEGORY 2       CATEGORY 3
Ameriprise           Lending Institutions   Banks
Country Inn          Lodging                Hotels           Bed & Breakfast
FirstBanc            Lending Institutions   Banks
Gillespie Fair       Events                 Festivals

That I need to convert—on a new sheet—into this:

COMPANY              CATEGORY
Ameriprise           Banks
Ameriprise           Lending Institutions
Country Inn          Bed & Breakfast
Country Inn          Hotels
Country Inn          Lodging
Firstbanc            Banks
Firstbanc            Lending Institutions
Gillespie Fair       Events
Gillespie Fair       Festivals

In a nutshell, I need to produce multiple entries for the Company for every Category that business falls under. Any help would be greatly appreciated.

DarrenH
  • 1
  • 1
  • 2
  • This is a pretty frequently asked type of question. Here's one very complete answer: http://stackoverflow.com/a/20800915/293078. I've also written a VBA solution that might be of interest:http://stackoverflow.com/a/10922351/293078 – Doug Glancy Jun 22 '16 at 01:54

1 Answers1

0

In data cleaning world, we call this reshaping a data frame from wide to long.

And there's a way to do it in Excel.

  1. Hit this key combination: Alt D P. This will bring up PivotTable Wizard (Yup, not many know this.)

  2. Select Multiple consolidation ranges. Click next.

  3. Select I will create the page fields. Click next.

  4. Select your data range. Click next.

  5. Select the location to show to pivot table. Click next.

  6. You'll see a pivot table appearing. In the PivotTable Field List, untick Row and Column.

  7. You should be left with count of value and a number. Double click that cell. You'll see a new sheet with your converted data table.
shawnl
  • 1,861
  • 1
  • 15
  • 17