Excel function to get first word from sentence in other cell

Ian Vink picture Ian Vink · Nov 24, 2010 · Viewed 137.7k times · Source

Excel: What function can I use to take the all the characters from the beginning to the first '<". I am trying to strip out the first word from A1 and put it into B1

Eg:

A1
Toronto<b> is nice

I want "Toronto" in the next cell.

Ian

Answer

Adriaan Stander picture Adriaan Stander · Nov 24, 2010

How about something like

=LEFT(A1,SEARCH(" ",A1)-1)

or

=LEFT(A1,SEARCH("<b>",A1)-1)

Have a look at MS Excel: Search Function and Excel 2007 LEFT Function