Link to home
Start Free TrialLog in
Avatar of Conernesto
ConernestoFlag for United States of America

asked on

How do I enter a formula in Excel to capture a part of text from a cell?

Hi,

I have values on my worksheet in column A. I want to capture from column A the contents on the left before the first space. Below are some examples. Do you have a formula for this? It's okay if the formula looks at only cell A1. I can copy the formula down to capture everying on column A.

Have                                                               Want

CarMax_TOT Special                                    CarMax_TOT
Toyota                                                            Toyota
Today don't go to work                               Today

Conernesto
Avatar of StellanRosengren
StellanRosengren
Flag of Sweden image

=LEFT(A1,FIND(" ",A1)-1)
You could also use the Text to Columns wizard to split the text at spaces. This would put the text into several columns, based on the number of spaces but you would then just delete those that you don't need.
ASKER CERTIFIED SOLUTION
Avatar of NBVC
NBVC
Flag of Canada image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of Conernesto

ASKER

The formula is not working for items that don't have a space. On my example above Toyota doesn't have a space. The value Toyota is not being returned with the formula you provided.
See my reply.
You are absolutely right. NBVC provided the solution.
Thank you.