Quantcast
Channel: Hot Weekly Questions - Web Applications Stack Exchange
Viewing all articles
Browse latest Browse all 9843

Output word within a string of words, if it matches to a value within a named range

$
0
0

I have a list of search queries for cars like:

  • hyundai ioniq hybrid
  • rav4 hybrid
  • hyundai ioniq electric
  • toyota yaris petrol
  • vauxhall automatic car

I also have a list of models of the cars (ioniq, rav4, etc) within a named range "models" and a list of makes (hyundai, toyota etc) in a named range "makes"

I'd like to output the model of the car for each string in a separate cell. If the model doesn't exist, then I'd like to output the make.

Example:

  • toyota yaris petrol = "yaris"
  • vauxhall automatic car = "vauxhall"

I've tried using a combination of countif and REGEXMATCH but don't seem to be going anywhere - it'd be great to get some help! :)


Viewing all articles
Browse latest Browse all 9843

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>