Extract Text

zinah

Active Member
Joined
Nov 28, 2018
Messages
368
Office Version
  1. 365
Platform
  1. Windows
Hi,

Anyone can help me with the right formula to extract the last text from the right. In below example, I need to extract whatever text comes after ABCD 1 or ABCD2.

Book2
AB
1TEXTExpected Result
2012 - USA - ABCD 2 GreenGreen
3011 - USA - ABCD 1 RedRed
4013 - USA - ABCD 2 YellowYellow
5014 - USA - ABCD 2 GreenGreen
6015 - USA - ABCD 1 RedRed
7016 - USA - ABCD 2 YellowYellow
8017 - USA - ABCD 2 GreenGreen
Sheet1
 

Excel Facts

How to create a cell-sized chart?
Tiny charts, called Sparklines, were added to Excel 2010. Look for Sparklines on the Insert tab.
If you just want the last word, how about
Excel Formula:
=TRIM(RIGHT(SUBSTITUTE(A2," ",REPT(" ",100)),100))
 
Upvote 0
Solution
If you just want the last word, how about
Excel Formula:
=TRIM(RIGHT(SUBSTITUTE(A2," ",REPT(" ",100)),100))
As usual THANK YOU so much, that worked perfectly great.
 
Upvote 0
You're welcome & thanks for the feedback.
 
Upvote 0
Another option with Excel 365 you could use FLASH FILL.
Type Green in cell B2.
Then go to DATA on ribbon
Then click on FLASH FILL and it will fill in the last word.
 
Upvote 0
Another option with Excel 365 you could use FLASH FILL.
Type Green in cell B2.
Then go to DATA on ribbon
Then click on FLASH FILL and it will fill in the last word.
That would work too, thank you for your help :)
 
Upvote 0

Forum statistics

Threads
1,223,885
Messages
6,175,179
Members
452,615
Latest member
bogeys2birdies

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