Make formula for the below detail

Copper Contributor
CategoryDriving Authority
AMotorcycle, Moped, Scooter
BCar, jeep, Delivery Van
CTempo, Auto Rickshaw
C1E-Rickshaw
DPower Tiller
ETractor
FMinibus, Minitruck
GTruck, Bus, Lorry
HRoad Roller, Dozer
H1Dozer
H2Road Roller
ICrane, Fire Brigade, Loader
I1Crane
I2Fire Brigade
I3Loader
J1Excavator
J2Backhoe Loader
J3Grader
J4Forklift
J5Other
KScooter, Moped

 make a function or formula or vba, for the following condition.

I have to write the category in the same cell with comma for example see below.

A, B

 

The the driving authority must come automatically in the other cell as below:

Motorcycle, Moped, Scooter, Car, jeep, Delivery Van

I may need to write up to 7 category In the same cell.

please make a formula for it.

8 Replies

@songgum And what's the logic behind all of this?

@Riny_van_Eekelen  I have to make report on the driving authority of the person where i work.

@songgum Sorry, but what's the logic for combining the entries for A and B into a string like "Motorcycle, Moped, Scooter, Car, jeep, Delivery Van". What's the next string you want an based on which rules?

@songgum 

With the permission of everyone involved, here is an example to unfold for yourself.

Please see the inserted file.

 

Thank you for your patience and time.

 

Nikolino

I know I don't know anything (Socrates)

 

 

@songgum 

=TEXTJOIN(", ",TRUE,XLOOKUP(FILTERXML("<y><z>"&SUBSTITUTE(E1,",","</z><z>")&"</z></y>","//z"),A1:A14,B1:B14))
Hey man i don't know the rule and logic i just want the above thing done.
hy it does not work or . i make a mistake. please elaborate it

@songgum 

Column A contains the Category and column B contains the Driving Authority. E1 contains the search criteria.