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

Check if a string appears within another cell, and return the longer of the 2

$
0
0

I am having a hard time thinking of an formula that can help me pull the data needed in this example:

enter image description here

In the C1 cell, I would like to make a formula that does this:

  1. Check if any cells in the A column contain the value that appears in B1
  2. If it finds a match, return the value from the A column but only if it is longer than the value that is already in B1
  3. If there is no such match, return the value of B1 again

So in this example, it should return "Bob Jones"

Any help would be greatly appreciated!


Viewing all articles
Browse latest Browse all 9843

Trending Articles



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