extracting 2nd string of word

bluepenink

Well-known Member
Joined
Dec 21, 2010
Messages
585
Hello

Ive managed to be able to extract the second string or word in a certain cell

i.e. 5 Atlanta-Charleston

I used the following formualt to get: Atlanta-Charleston

=MID(SUBSTITUTE(E42," ","^",LEN(E42)-LEN(SUBSTITUTE(E42," ",""))),FIND("^",SUBSTITUTE(E42," ","^",LEN(E42)-LEN(SUBSTITUTE(E42," ",""))))+1,256)

where E42 = 5 Atlanta-Charleston

my PROBLEM i run into, is when i the city name changes to i.e.
7 Houston-Austin-San Antonio-Albur
or
4 Wichita-Oklahoma City

Basically, i want to replace the first character i.e. the # and just get the text string...can someone pls help!

cheers
 

Excel Facts

Repeat Last Command
Pressing F4 adds dollar signs when editing a formula. When not editing, F4 repeats last command.
So you just want to remove the first word (or number)..
Basically, remove up to and including the first space?

Try

=REPLACE(E42,1,FIND(" ",E42),"")

Hope that helps.
 
Upvote 0
Based on the sample you posted, you should be able to use:
=RIGHT(E42,LEN(E42)-2)

If however, the number at the start of the string could be more than 1 digit, use:
=RIGHT(E42,LEN(E42)-FIND(" ",E42))
 
Upvote 0

Forum statistics

Threads
1,224,543
Messages
6,179,429
Members
452,914
Latest member
echoix

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