Forum Discussion

Lou_117's avatar
Lou_117
Copper Contributor
Oct 22, 2020

VLOOKUP & SEARCH Functions

Is there a way to combine a VLOOKUP with a SEARCH function? For example, in one column I have a bunch of unregulated comments referring to another facility and/or city. I have a list of all possible cities and facilities but am not sure how to tell format the equation to say look in this string of words for a word that matches this table of cities. Is this possible? I can try to mock up the data if that would be helpful!

 

5 Replies

  • Lou_117 

    It would be helpful if you could provide an example of what the data look like and of what the expected result would be.

    • Lou_117's avatar
      Lou_117
      Copper Contributor

      HansVogelaar Of course! I attached a file with an example that the data comes in a very unregulated format as they are "comments" and then I listed all the cities within the state and all the hospitals. I did not list all the health systems for the overarching organization but did a few to give you an idea. 

       

      I am hoping to have a formula that scans the "comment" field for any of the city names, and facilities, (I will list states so it can populate as "Outside of State") but if a city is not found it returns "" so the cell appears blank. However, if the facility is listed but the city is now, it would be great if it could return "Unknown". I hope this helps!

      • Lou_117 

        Thanks. In row 2 on Sheet 1, you have Beaumont as Goal 1 and Detroit as Goal 2.

        Sheet2 has 9 instances of Beaumont Hospital, but none of them is in Detroit.

        How does that work?

Resources