Why it works
- What it does
- TEXTBEFORE(text, " ") returns what comes before the first space. Trim the name first in case it starts with a space, and add a space at the end so a one-word name still has a space to find.
- The shape of the formula
- =TEXTBEFORE(TRIM(name) & " ", " ")
- How to remember it
- Give it a space to find, and it never fails.
- The usual mistake
- LEFT and FIND on raw names. A leading space gives an empty greeting and a one-word name gives #VALUE!.
Keep practicing
Updated