Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Excel function to get first word from sentence in other cell

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

like image 653
Ian Vink Avatar asked Nov 24 '10 07:11

Ian Vink


People also ask

How do I extract the first letter of each word in a cell in Excel?

Select a blank cell, here I select the Cell G1, and type this formula =LEFT(E1,3) (E1 is the cell you want to extract the first 3 characters from), press Enter button, and drag fill handle to the range you want. Then you see the first 3 characters are extracted.


1 Answers

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

like image 123
Adriaan Stander Avatar answered Oct 21 '22 08:10

Adriaan Stander