How do I check if the contents in one cell exist in another cell?

I am trying to check the name in one cell for a match in another cell which has a list of names. I want to check if the name in cell A is one the list of names in cell B.

Please explain to the detail in what way you got one “other cell” to contain a list of names. In other words: What’s your list syntax?
Calc still not has implemented a standard function to split a list given as a single string.

Delimiter: || (2 consecutive pipe symbols) e.g.
Check for: myName in cell A2
List: tomsName||yourName||myName||King James IX in cell L2
Formula: =ISNUMBER(FIND("||" & A2 & "||"; "||" & L2 & "||"))
will return TRUE.
Change A2 to My_Name
and the formula will return FALSE.
Change A2 to King James and the result will still be FALSE.
With A2 = King James IX you will get TRUE again.

Several function can help, maybe COUNTIF() it’s the simplest for this case.
If you find troubles to have them working fine, verify it is not an issue with regular expression or wildcards as part of the strings inadvertently, Menu/Tools/Options/LibreOffice calc/Calculate.

COUNTIF()
MATCH()
LOOKUP()
VLOOKUP()

If my assumption concerning a list “in cell B” holds, the functions named here won’t be useful.
Instead you need to know the syntax (most likely a specific delimiter assured to not occur inside a list element) and to look for a respective portion of the list with the help of FIND() or SEARCH() or REGEX().