Group By Character Name and list all Scene numbers

signup

New Member
Joined
Feb 15, 2018
Messages
42
Office Version
  1. 2019
Platform
  1. Windows
Hello All, Hope you are doing Fine.

I have Excel data as shown in the below table. Can anyone help me to get the desired output?

SCENE NUMBER
CHARACTER NAME
E01 SC 01​
MICHAEL
E01 SC 01​
JACK
E01 SC 01​
ELIZABETH
E01 SC 02​
JOHN
E01 SC 02​
MICHAEL
E01 SC 03​
JACK
E01 SC 03​
SAMANTHA
E01 SC 03​
MICHAEL
E01 SC 03​
LOGAN​
E01 SC 04​
ELIZABETH
E01 SC 04​
SAMANTHA
E01 SC 04​
LOGAN​
E01 SC 05​
MICHAEL
E01 SC 05​
JACK
E02 SC 01​
EVAN​
E02 SC 01​
ELIZABETH
E02 SC 01​
JOHN
E02 SC 02​
MICHAEL
E02 SC 02​
SAMANTHA
E02 SC 03​
ANGEL​
E02 SC 03​
LOGAN​
E02 SC 04​
JOHN
E02 SC 04​
MICHAEL
E02 SC 05​
JACK
E02 SC 06​
MICHAEL
E02 SC 07​
ANGEL​
E02 SC 07​
LOGAN​
E02 SC 08​
SAMANTHA
E02 SC 09​
JACK
E02 SC 09​
JOHN
E02 SC 10​
MICHAEL

In the above sheet, I have character names from the scene. I need to prepare Character-wise scene numbers for my project. So, by making characters unique I need to create a list of scene numbers.

EXPECTED OUTPUT : (Note: Below output is Just to understand the requirement only but not precisely like this)

I need to get all the scene numbers list for the character.

MICHAEL -
E01 SC 01, E01 SC 02, E01 SC 03, E01 SC 05, E02 SC 02, E02 SC 04, E02 SC 06, E02 SC 10
JACK - E01 SC 01, E01 SC 03, E01 SC 05, E02 SC 05, E02 SC 09
ELIZABETH - E01 SC 01, E01 SC 04, E02 SC 01
JOHN - E01 SC 02, E02 SC 01, E02 SC 04, E02 SC 09
SAMANTHA - E01 SC 03, E01 SC 04, E02 SC 02, E02 SC 08
LOGAN - E01 SC 03, E01 SC 04, E02 SC 03, E02 SC 07
EVAN - E02 SC 01
ANGEL - E02 SC 03, E02 SC 07

If there is any way to achieve this, Please help me.

Thanks in advance!
 
FactSheet_Data_New (17).xlsx
EFG
1LocationSceneVehicles
2VILLAGE ROADSEP1 SC1Logan Ambulance
3NATIONAL HIGHWAYEP1 SC2, EP1 SC2Logan ambulance, black SUV
4FLIGHTEP1 SC3flight
5HIGHWAY ROADEP1 SC4Jack bike
6BEACHEP1 SC8, EP1 SC8, EP1 SC8Tatasumo for terrorist, Vani car, Old Car
7JACK'S HOUSEEP1 SC12Aswift car
8MICHAEL'S HOUSE COLONY ROADEP1 SC13, EP1 SC13, EP1 SC13, EP1 SC13, EP1 SC13, EP1 SC13Logan car, Michael bike, Accident vehicle scorpio, Police vehicle, extra car, Bike 2
9MAIN ROADEP1 SC14, EP1 SC14, EP1 SC14, EP1 SC14, EP1 SC14, EP1 SC14, EP1 SC14, EP1 SC14, EP1 SC14, EP1 SC14, EP1 SC14, EP1 SC14, EP1 SC14Michael's bike, two buses, cars 20, bikes and scooters 40, Autos 5, Tempo vans 2, John bike, Bharath bike, Foods cart, Jack bike, 6689 car, Police vehicles 2, ambulance
10U TURN POINTEP1 SC15ambulance
11JOHN'S CAR : ROADEP1 SC17, EP1 SC17, EP1 SC17John car, car, bikes
12JOHN'S OFFICEEP1 SC18John car
13ROAD UNKNOWNEP1 SC29AJohn bike
Sheet1


Power Query:
let
    Source = Excel.CurrentWorkbook(){[Name="Table1"]}[Content],
    Group = Table.Group(Source, {"Location"}, {{"Scene", each _, type table [Scene Number=text, LOCATION=text, Vehicles=text]}}),
    Vehicles = Table.AddColumn(Group, "Vehicles", each Text.Combine([Scene][Vehicles],", ")),
    Scene = Table.TransformColumns(Vehicles,{{"Scene", each Text.Combine(_[Scene Number],", ")}})
in
    Scene
 
Upvote 0

Excel Facts

Lock one reference in a formula
Need 1 part of a formula to always point to the same range? use $ signs: $V$2:$Z$99 will always point to V2:Z99, even after copying

Forum statistics

Threads
1,223,246
Messages
6,170,987
Members
452,373
Latest member
TimReeks

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