Excel VBA Course
Excel VBA Course - From Beginner to Expert

200+ Video Lessons
50+ Hours of Video
200+ Excel Guides

Become a master of VBA and Macros in Excel and learn how to automate all of your tasks in Excel with this online course. (No VBA experience required.)

View Course

Selecting the first word in a varying string of text

1

Hi,

I need to select the first word in a string of text of varying length and the first word will be of varying length as well.

Can anyone assist with the formula please?

Many thanks

Answer
Discuss

Answers

0
Selected Answer

Try this formula:

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

A1 is the cell where the text is.

This assumes that your text is separated by a space, which is why " " is there. If the words used, for instance, a dash as a separator, you would put "-" instead of the blank space inbetween the quotation marks.

Discuss

Discussion

many thanks for the response
Peanut (rep: 2) Jun 29, '16 at 4:56 pm
how would you address the situation if your text begins with numbers, or has no space.
for instance chemicals can begin with letters, numbers, etc.. examples follow
all i want to do is extract the chemical name to sort or find in my inventory
1,3-BUTADIENE,  65F BUTANE FUEL,  JT9458-3/TRICHLOROETHYLENE,  TI02 TITANIUM OXIDE,  14735  CARBON POWDER
jhixy (rep: 2) Jul 7, '16 at 9:52 am
jhixy, you need to ask a separate question for this. Go back to the forum and click the green Ask Question button.
don (rep: 1989) Jul 7, '16 at 11:21 am
Add to Discussion


Answer the Question

You must create an account to use the forum. Create an Account or Login