Formula to keep specific words only based on position

IamNewbee

New Member
Joined
Sep 18, 2017
Messages
7
Hi guys, I am new to excel formulas and I am struggling with a formula.

I have a line of text,of which I want to keep only the 2nd and 3rd word and remove the rest. for example: cell A1 contains 'I love reading books' . I want to write a formula/vba code whichever is easier to give output in B1 as 'love reading'.

Could someone help me with this? Thanks in advance :)
 

Excel Facts

When they said...
When they said you are going to "Excel at life", they meant you "will be doing Excel your whole life".
Not sure what you want to happen if there are fewer than three words. Here's a potential solution:


Book1
AB
1I love reading bookslove reading
2Sometimes wbd rocks the cradlewbd rocks
3SingleSingle
4Two wordswords
Sheet1
Cell Formulas
RangeFormula
B1=MID($A1,IFERROR(FIND(CHAR(1),SUBSTITUTE($A1," ",CHAR(1),1)),0)+1,IFERROR(FIND(CHAR(1),SUBSTITUTE($A1," ",CHAR(1),3)),LEN($A1)+1)-IFERROR(FIND(CHAR(1),SUBSTITUTE($A1," ",CHAR(1),1)),0)-1)


WBD
 
Upvote 0
you could try this formula in B1 ...

=MID(A1,FIND(" ",A1,1)+1,LEN(A1)-FIND(" ",A1,FIND(" ",A1)+2)-1)

Kind regards,

Chris
 
Upvote 0
at the moment I am able to remove the first word using formula RIGHT(A1,LEN(A1)-FIND(" ",A1))... Struggling with the remaining words.
 
Upvote 0
Hi, just another option - different result for the single word though.


Excel 2013/2016
AB
1I love reading bookslove reading
2Sometimes wbd rocks the cradlewbd rocks
3Single
4Two wordswords
Sheet2
Cell Formulas
RangeFormula
B1=TRIM(LEFT(SUBSTITUTE(MID(A1,FIND(" ",A1&" ")+1,999)," ",REPT(" ",999),2),999))
 
Upvote 0
Hi, just another option - different result for the single word though.

Excel 2013/2016
AB
1I love reading bookslove reading
2Sometimes wbd rocks the cradlewbd rocks
3Single
4Two wordswords

<colgroup><col><col><col></colgroup><thead>
</thead><tbody>
</tbody>
Sheet2

Worksheet Formulas
CellFormula
B1=TRIM(LEFT(SUBSTITUTE(MID(A1,FIND(" ",A1&" ")+1,999)," ",REPT(" ",999),2),999))

<thead>
</thead><tbody>
</tbody>

<tbody>
</tbody>
Even this works wonders....easier to understand. Thank you so much for your help :)
 
Upvote 0

Forum statistics

Threads
1,215,782
Messages
6,126,872
Members
449,345
Latest member
CharlieDP

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