Pivot table - multiple entries per row

Tashat

Board Regular
Joined
Jan 12, 2005
Messages
135
Office Version
  1. 365
Platform
  1. Windows
Hello wonderful Excel people

Can someone help me with a pivot table issue please? (data below is a short excerpt of test data) - I have many more lines. Most people in the list speak more than one language ( separated by | ). I want to be able to pull a pivot table which shows all the speakers of each language. So for example, I want each language in the column down the side and then all the names of the people who speak that language. Therefore, some people's name will appear 2 or 3 times in the pivot table. Is this possible? Can anyone advise how I could do this?

I may also want to pull in region details at some point, but one set at a time. Thanks in advance

Book1
ABC
1NameRegionLanguage
2HarkishanYorkshire & The HumberSwahili
3BushraYorkshire & The HumberPunjabi | Urdu
4NusratYorkshire & The HumberGujarati | Other
5NedaCheshire & LiverpoolPunjabi | Urdu
6GloriaCheshire & LiverpoolBengali
7AshleighWest MidlandsNot Applicable
8OyekanmiWest MidlandsArabic
9SubhashWest MidlandsCantonese | Mandarin | Other
10ZeidWest MidlandsYoruba | Other
11AnwaarWest MidlandsNot Applicable
12CatherineWest MidlandsArabic
13SumiaWest MidlandsPunjabi | Urdu
14HaseebWest MidlandsPunjabi | Urdu
15SanjayWest MidlandsGujarati | Punjabi | Urdu | Other
16AthmanWest MidlandsGujarati | Swahili | Urdu
17NiazWest MidlandsBengali
18JyotiWest MidlandsPunjabi | Urdu | Other
19IftikharEast MidlandsGujarati | Urdu | Other
20GuixianEast MidlandsMandarin
21LolitaEast MidlandsArabic | Other
Sheet2
Cells with Conditional Formatting
CellConditionCell FormatStop If True
C14:C21Expression=$I14="Vacancy"textNO
C14:C21Expression=$I14="Resigned"textNO
C2:C13Expression=$I2="Vacancy"textNO
C2:C13Expression=$I2="Resigned"textNO
 
the best way is select whole range and hit Ctrl+T, it will create excel table
about error: check if the name of column Language is real Language but not language. Power Query is case sensitive !!!
Thank you so much! I've got it to work. That is so amazing and started me off on a new path of learning in Excel. Thank you.

Can I be super cheeky and ask if there is a way to make the Names appear in a list with each name on a new line within the single cell against each language? I'll have to teach myself all the syntax in this. Thank you.
 
Upvote 0

Excel Facts

Enter current date or time
Ctrl+: enters current time. Ctrl+; enters current date. Use Ctrl+: Ctrl+; Enter for current date & time.
you mean like this?
LanguageNames
ArabicCatherine
ArabicLolita
ArabicOyekanmi
BengaliGloria
BengaliNiaz
CantoneseSubhash
GujaratiAthman
GujaratiIftikhar
GujaratiNusrat
GujaratiSanjay
MandarinGuixian
MandarinSubhash
Not ApplicableAnwaar
Not ApplicableAshleigh
OtherIftikhar
OtherJyoti
OtherLolita
OtherNusrat
OtherSanjay
OtherSubhash
OtherZeid
PunjabiBushra
PunjabiHaseeb
PunjabiJyoti
PunjabiNeda
PunjabiSanjay
PunjabiSumia
SwahiliAthman
SwahiliHarkishan
UrduAthman
UrduBushra
UrduHaseeb
UrduIftikhar
UrduJyoti
UrduNeda
UrduSanjay
UrduSumia
YorubaZeid
 
Last edited:
Upvote 0
you mean like this?
LanguageNames
ArabicCatherine
ArabicLolita
ArabicOyekanmi
BengaliGloria
BengaliNiaz
CantoneseSubhash
GujaratiAthman
GujaratiIftikhar
GujaratiNusrat
GujaratiSanjay
MandarinGuixian
MandarinSubhash
Not ApplicableAnwaar
Not ApplicableAshleigh
OtherIftikhar
OtherJyoti
OtherLolita
OtherNusrat
OtherSanjay
OtherSubhash
OtherZeid
PunjabiBushra
PunjabiHaseeb
PunjabiJyoti
PunjabiNeda
PunjabiSanjay
PunjabiSumia
SwahiliAthman
SwahiliHarkishan
UrduAthman
UrduBushra
UrduHaseeb
UrduIftikhar
UrduJyoti
UrduNeda
UrduSanjay
UrduSumia
YorubaZeid
Hello apologies for the delay

No I meant like this...are you able to help?

Book1
AB
1LanguageNames
2AkanGloria Asumang Kwame Nuako Obed Ababio Solomon Asiedu
3ArabicAbbas Zayni Amier Amily Amira Akshar Asif Ali Chuka Dieobi Intisar Alqsar Lolita Hardy Maged Musaeed Maria Nader Neda Al-Yafeai Ramie El-Nahas Salima Awad Sumia Afif
4BengaliAlamgir Miah Fatima Munim Niamat Shaer Niaz Jaigirdar Phul Meah
5CantoneseCheok Teng Lok Cheok Wun Lok Cissie Tsang Jinyu Shan Lai Kam Ng Lu Cai Wai Cheung
Sheet1
 
Upvote 0
Power Query:
// Table1
let
    Source = Excel.CurrentWorkbook(){[Name="Table1"]}[Content],
    Split = Table.ExpandListColumn(Table.TransformColumns(Source, {{"Language", Splitter.SplitTextByDelimiter(" | ", QuoteStyle.Csv), let itemType = (type nullable text) meta [Serialized.Text = true] in type {itemType}}}), "Language")
in
    Split
then Close&Load - Load To - Only create connection - Load
and then Insert - Pivot Table and use Query table as data source
LanguageName
ArabicCatherine
Lolita
Oyekanmi
BengaliGloria
Niaz
CantoneseSubhash
GujaratiAthman
Iftikhar
Nusrat
Sanjay
MandarinGuixian
Subhash
Not ApplicableAnwaar
Ashleigh
OtherIftikhar
Jyoti
Lolita
Nusrat
Sanjay
Subhash
Zeid
PunjabiBushra
Haseeb
Jyoti
Neda
Sanjay
Sumia
SwahiliAthman
Harkishan
UrduAthman
Bushra
Haseeb
Iftikhar
Jyoti
Neda
Sanjay
Sumia
YorubaZeid
 
Upvote 0
Power Query:
// Table1
let
    Source = Excel.CurrentWorkbook(){[Name="Table1"]}[Content],
    Split = Table.ExpandListColumn(Table.TransformColumns(Source, {{"Language", Splitter.SplitTextByDelimiter(" | ", QuoteStyle.Csv), let itemType = (type nullable text) meta [Serialized.Text = true] in type {itemType}}}), "Language")
in
    Split
then Close&Load - Load To - Only create connection - Load
and then Insert - Pivot Table and use Query table as data source
LanguageName
ArabicCatherine
Lolita
Oyekanmi
BengaliGloria
Niaz
CantoneseSubhash
GujaratiAthman
Iftikhar
Nusrat
Sanjay
MandarinGuixian
Subhash
Not ApplicableAnwaar
Ashleigh
OtherIftikhar
Jyoti
Lolita
Nusrat
Sanjay
Subhash
Zeid
PunjabiBushra
Haseeb
Jyoti
Neda
Sanjay
Sumia
SwahiliAthman
Harkishan
UrduAthman
Bushra
Haseeb
Iftikhar
Jyoti
Neda
Sanjay
Sumia
YorubaZeid
That's absolutely brilliant! Thank you! It's working perfectly.
 
Upvote 0

Forum statistics

Threads
1,214,632
Messages
6,120,655
Members
448,975
Latest member
sweeberry

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
Back
Top