# First word in a cell

#### daffy

##### Board Regular
Hi Guys

Is this possible?

What i would like to do is.

If the first word in a cell for example says "travel" then display the content of another cell, if it does not then just leave the other cell blank.

Its a job sheet that says travel to ???????? or travel to ******
So i need to pick out just the word "travel"

There are other line in the spreadsheet that do not say travel at all so these to will be ignored.

This may be simple but i am stuck on it.

Thanks in advanced for any help.

Don

### Excel Facts

Repeat Last Command
Pressing F4 adds dollar signs when editing a formula. When not editing, F4 repeats last command.

#### Mike Blackman

##### Well-known Member
Hi,

Maybe something like this?

=IF(LEFT(A1,FIND(" ",A1)-1)="Travel",B1,"")

#### baitmaster

##### Well-known Member
in a new cell3, try: =if(left([cell1],6)="travel",[cell2],"")

where [text] are your relevant cell references

#### daffy

##### Board Regular
Guys

Thanks for the quick responce.

Mike, Got yours to work no problem

Bait Master Could not seem too get your to work.

Thank you both for your help (it was much needed)

Don

#### Peter_SSs

##### MrExcel MVP, Moderator

Guys

Thanks for the quick responce.

Mike, Got yours to work no problem

Bait Master Could not seem too get your to work.

Thank you both for your help (it was much needed)

Don
Mike's solution included a check to make sure the first word was "Travel" rather than something like "Travelling". A simpler way to do that would be:
=IF(LEFT(A1,7)="Travel ",B1,"")

#### daffy

##### Board Regular
Peter

Could you explain to me what the number 7 is for.

=IF(LEFT(A1,7)="Travel ",B1,"")

Thanks

Don

#### Weaver

##### Well-known Member
LEFT(A1,7) refers to the first 7 characters in the string contained in cell A1

The idea being that "travel" is 6 letters and if the string started with "travelling" you'd still get a match, whereas comparing the first 7 characters and including the space after "travel " ensures this doesn't happen. If you want it to, go back to left(A1,6)="travel"

#### daffy

##### Board Regular
Thanks for making it clear.

Replies
10
Views
433
Replies
24
Views
2K
Replies
6
Views
555
Replies
4
Views
518
Replies
10
Views
320

Excel contains over 450 functions, with more added every year. That’s a huge number, so where should you start? Right here with this bundle.

1,163,881
Messages
5,834,226
Members
430,267
Latest member
Excel_User_4

### We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.

### Which adblocker are you using?

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

### Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

### Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back