Copy everything before the 2nd space

daniels012

Well-known Member
Joined
Jan 13, 2005
Messages
5,219
I have 6 words in column A
I want to put the 2 left most words into column B.
What is a formula that will give me such data??
The words are varied in size.

Thank You,
Michael
 

Excel Facts

What is the fastest way to copy a formula?
If A2:A50000 contain data. Enter a formula in B2. Select B2. Double-click the Fill Handle and Excel will shoot the formula down to B50000.
daniels012

Try =LEFT(A1,FIND(" ",A1,FIND(" ",A1)+1)-1)
 
Upvote 0
You are a blessing. Thank You so much. I have been working on this for about an hour.

So, if I wanted the 3 left words would I...

Try =LEFT(A1,FIND(" ",A1,FIND(" ",A1),A1,Find(" ",A1)+2)+1)-1)

?? I don't know??

Thank You!!
Michael
 
Upvote 0
daniels012 said:
You are a blessing. Thank You so much. I have been working on this for about an hour.

So, if I wanted the 3 left words would I...

Try =LEFT(A1,FIND(" ",A1,FIND(" ",A1),A1,Find(" ",A1)+2)+1)-1)

?? I don't know??

Thank You!!
Michael
No, the syntax in your formula is incorrect. However, rather than extending the ideas in my previous post, if the number of words to be extracted might change or is more than two, then I suggest this alternative approach.

I have put the number of words to be extracted in C2 for ease of testing (but you could build it into the formula if you want. The formula in B1 is:
=LEFT(A1,FIND("@",SUBSTITUTE(A1&" "," ","@",C2))-1)
Mr Excel.xls
ABCD
1one two three four five sixone two threeNo of words required from A1
23
3
Left 2 Words
 
Upvote 0

Forum statistics

Threads
1,222,441
Messages
6,166,050
Members
452,010
Latest member
triangle3

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.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

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

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

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
Back
Top