Extract data from right until blank

kchbs

New Member
Joined
Jan 15, 2004
Messages
2
Can someone please help me with a formula to extract a word from a cell starting from the right moving left until blank. I want to put this information into a separate cell.

Here is sample of the data:

Univ. Connecticut Med School Farmington
266 Coldbrook Road Glastonbury
100 Retreat Avenue Hartford
195 S. Main Street Middleton
87 Grandview Avenue Waterbury
87 Grandview Avenue Waterbury




THANKS so much for any assistance

Karen
 

Excel Facts

Copy PDF to Excel
Select data in PDF. Paste to Microsoft Word. Copy from Word and paste to Excel.
A generic formula to extract last word...

=RIGHT(A1,LEN(A1)-SEARCH(CHAR(127),SUBSTITUTE(A1," ",CHAR(127),LEN(A1)-LEN(SUBSTITUTE(A1," ","")))))

Simpler and faster if you install the morefunc.xll add-in...

=WMID(A1,WORDCOUNT(A1))
 
Upvote 0
thank you, thank you, thank you!!

One more question - how do I cut the same text I extracted out of the first cell so that now they are split into 2 and there is no duplication of the city

Karen
 
Upvote 0
Book8
ABCDE
1Univ.ConnecticutMedSchoolFarmingtonFarmingtonUniv.ConnecticutMedSchool
2266ColdbrookRoadGlastonburyGlastonbury266ColdbrookRoad
3100RetreatAvenueHartfordHartford100RetreatAvenue
4195S.MainStreetMiddletonMiddleton195S.MainStreet
587GrandviewAvenueWaterburyWaterbury87GrandviewAvenue
687GrandviewAvenueWaterburyWaterbury87GrandviewAvenue
7
8
9
10
Sheet1


Using Aladin's formula in b1, the formula in c1 is what I used to separate the city out. Surely, Aladin's solution will probably be much cleaner and more efficient, but I just started playing around with text and I thought I'd take a stab at it.

Else, another formula that could go in C1 is:

=LEFT(A1,LEN(A1)-LEN(B1))
 
Upvote 0

Forum statistics

Threads
1,214,788
Messages
6,121,603
Members
449,038
Latest member
Arbind kumar

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