Sep 24 2019 07:56 AM
Table 1.col A has a list of comments. Col B I currently have an if statement to pick out recurring words to classify the comment. I want to refine this to make it more manageable. Any suggestions.
=IF(ISNUMBER(SEARCH("Luton",B2)),"Van",IF(ISNUMBER(SEARCH("Mini",B2)),"Car",IF(ISNUMBER(SEARCH("Canoe",B2)),"Boat",IF(ISNUMBER(SEARCH("Mitsubishi",B2)),"Car"))))
Sep 24 2019 08:16 AM - edited Sep 24 2019 08:17 AM
If you create a Lookup Table like this... (in this case the Lookup Table is created in the range R1:S4)
Then you can simply use this formula...
=INDEX($S$1:$S$4,MATCH(TRUE,ISNUMBER(SEARCH($R$1:$R$4,B2)),0))
Just change the ranges referred in the above formula based on the range of your Lookup Table and the formula will work correctly.
Sep 24 2019 08:22 AM
SolutionSep 25 2019 12:43 AM
Thanks@Sergei Baklan this worked just as I wanted - Much appreciated.
Sep 25 2019 12:45 AM
Sep 24 2019 08:22 AM
SolutionAnother variant
=LOOKUP(2,1/ISNUMBER(SEARCH($R$1:$R$4,B2)),$S$1:$S$4)