Hi everyone,

I'm having a few issues here with my if function, any help appreciated.

My function is

=IF(OR(E21="",E21="n/a"),G21, LEFT(E21, FIND("-", E21)-2))


The function works great except when it encounters a word in cell E21 that has no hyphens ("-"). I tried to use the extract word before space as well but sometimes E21 has one word with a space.

How would I write this function to call Cheer both from a cell that reads Cheer - AW222 and Cheer?

Thank you in advance!