Creating a category column based off sub-categories from a dropdown column

Hi,
I'm looking to make a column which returns the corresponding category for sub categories in another dropdown column
For example, I have column 1: The text/number column for writing a formula to return the category and column 2: the dropdown for which I have subcategories.
In column 1, I have categories X,Y and Z. in column 2, I have A,B,C,D,E,F.
Let's say I want A and B to be under X, C and D under Y, E and F under Z.
if I select A and B in column 2, column 1 should return X in the same row.
if I select A, B and C in column 2, column 1 should return X,Y (or any delimiter like X:Y).
How would I go about doing this?
Thanks
Answers
-
I would suggest creating a reference table where the subcategories are listed in one column and their corresponding categories in another.
Then you would use a JOIN/COLLECT like so:
=JOIN(COLLECT({Reference Table Category Column}, {Reference Table SubCategory Column}, HAS(SubCategory@row, @cell)), "delimiter of choice")
Help Article Resources
Categories
- All Categories
- 14 Welcome to the Community
- Customer Resources
- 67.9K Get Help
- 474 Global Discussions
- 208 Use Cases
- 517 Announcements
- 5.6K Ideas & Feature Requests
- 87 Brandfolder
- 157 Just for fun
- 84 Community Job Board
- 521 Show & Tell
- 36 Member Spotlight
- 3 SmartStories
- 309 Events
- 37 Webinars
- 7.3K Forum Archives
Check out the Formula Handbook template!