How to get first word from a sentence in excel column


#1

I have a excel column with first and last names image

I want to just save the first name in each column to use as a variable in a email message. I already have the correct For each row and Get row activity.I tried doing an assign firstNameStr=firstName.Substring(0, str.IndexOf(" ")), but that didn’t work.

Anyone got any ideas?


#2

Hey @Mikej1815

Try using firstNameStr=firstName.Split(" "c)(0)

Hope it helps :slight_smile: