I have a question about Google Sheets. So I have a pre generated list with a manager name and client name and a weekly generated lists with the client name. I want to be able to compare both lists and when a match is found for the manager name to be filled on the row where the match was found. I don't know what would be the simplest way to achieve this.
Here is what I have tried so far:
This is how client cells look:
Bassman, Harley & Lori:Bassman, Harley & Lori-P/M Svc:D-Bassman, High ceiling Separation, 1-26-20
So I used
=SPLIT(E4 , " ") to split apart everything but the last name so for the above cell I get left with
Then I compared the left over with this statement
=IF(OR(O4 = "Campbell,", O4 = "Campbell"), "Mike S", " ")
I found a couple of examples but I cant wrap my head around how to make this work. I had originally thought about making a loop but I think the built in functions would be easier to work with. What i can't figure out is how do i iterate through all the possible managers.
Here is an example sheet of what i'm trying to accomplish. Sheet Here