VBA: Turn comma separated list(s) into one master list.

SteveOranjinSteve

Board Regular
Joined
Nov 18, 2019
Messages
78
Office Version
  1. 365
  2. 2019
Platform
  1. Windows
Hello,

Hope you're well. I'm looking to create a master data sheet that I can work from for the purpose of turning this into a pivot table. There are 3 comma separated lists within the WIDER excel sheet that I'm looking to reduce, each, into a line by line item. This is the format of that data, and then I will show you how I would like it to look. I also have a sheet of the data attached.

ProductSKU DescriptionSpare Part(SP)/Finished Good (FG)In SAP?Name (New - RFI list)JDEDIV list
0.617.096HS 800 Sealing MachineFGNoCroatia, Greece, Morocco, Spain, South AfricaAndorra, United Arab Emirates, Afghanistan, Antigua and Barbuda, Albania, Armenia, Netherlands Antilles, Angola, Argentina, Austria, Australia, Aruba, Azerbaijan, Bosnia and Herzegovina, Barbados, Bangladesh, Belgium, Burkina Faso, Bulgaria, Bahrain, BurundiCroatia, Greece, Morocco
0.617.067HS 800 Sealing MachineFGNoAndorra, United Arab Emirates, Afghanistan, Antigua and Barbuda, Albania, Armenia, Netherlands Antilles, Angola, Argentina, Austria, Australia, Aruba, Azerbaijan, Bosnia and Herzegovina, Barbados, Bangladesh, Belgium, Burkina Faso, Bulgaria, Bahrain, Burundi, Benin

I'd like it to look like this.


ProductSKU DescriptionSpare Part/Finished GoodIn SAPListCountry
0.617.096HS 800 Sealing MachineFGNoRFICroatia
0.617.096HS 800 Sealing MachineFGNoRFIGreece
0.617.096HS 800 Sealing MachineFGNoRFIMorocco
0.617.096HS 800 Sealing MachineFGNoRFISpain
0.617.096HS 800 Sealing MachineFGNoRFISouth Africa
0.617.096HS 800 Sealing MachineFGNoJDEAndorra

Is this something that is possible?

Please see Copy of Comparison - Pivot 6.8.2.1.xlsm

Steve
 

SteveOranjinSteve

Board Regular
Joined
Nov 18, 2019
Messages
78
Office Version
  1. 365
  2. 2019
Platform
  1. Windows
How do I find out what the table name is? I was just about to post that. That's how far I got.
 

Excel Facts

Quick Sum
Select a range of cells. The total appears in bottom right of Excel screen. Right-click total to add Max, Min, Count, Average.

SteveOranjinSteve

Board Regular
Joined
Nov 18, 2019
Messages
78
Office Version
  1. 365
  2. 2019
Platform
  1. Windows
This is literally the fourth time I've used power query.. used it twice a year ago I think....
 

lrobbo314

Well-known Member
Joined
Jul 14, 2008
Messages
3,602
Office Version
  1. 365
Platform
  1. Windows
When you add your table and then get into the advanced editor, you should see a line that looks like this. It has the correct table name in there already.

Source = Excel.CurrentWorkbook(){[Name="Table1"]}[Content]

When you paste the code in just make sure that that "Table1" is in the pasted code. I believe my original post was Table6.
 

alansidman

Well-known Member
Joined
Feb 26, 2007
Messages
7,300
Office Version
  1. 365
Platform
  1. Windows
Steve - Look at the link in my signature block on using Mcode and PQ
 

Forum statistics

Threads
1,181,702
Messages
5,931,548
Members
436,792
Latest member
oriator

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Top