Forum Discussion
How to categorise based on a specific word in a cell?
Hi guys,
I am not sure excel can do what I need but here we go:
In cell "A" I am being provided with a category with potentially lots of words. Based on one of those words I would like to categorise cell "B". Example below:
Cell "A" phrase is: "NBA teams from New York and Boston"
Based on the word "Boston" I would like cell "B" to automaticially be categorised as "Boston".
How do I do that?
I can make a XLOOKUP formel where I tell Excel that Boston = Boston, but what I need is for Excel to find out by itself that if cell "A" has the word "Boston" in it (no matter where it is placed), then cell "B" should automaticially be categorised as "Boston".
How do I do this? I really appreciate any kind of help.
Best regards,
Henrik
5 Replies
- Subodh_Tiwari_sktneerSilver ContributorA sample file would be helpful to visualize what exactly you are trying to achieve.
- dmacgmeCopper ContributorYour exact example could be solved using the FIND function which will look in one cell for text specified in another cell. If (*note IF) it returns a number, you know your string is present, then use IF(A1>0,"boston","") and you get your desired word. However, as the previous response indicated, it is nearly impossible to give a more robust or complete answer to this question without more information.
- Henne79Copper Contributor
dmacgme & Subodh_Tiwari_sktneer thank you so much for replying.
I have attached an excelark to this message which should explain my problem.
The "problem" is that I cannot edit the input (Colonne B) because it is given to me by a third party. Hope it make sense and that you can help me out.
Best regards,
Henne