Help with RIGHT function

Yusuf

Active Member
Joined
Jun 1, 2004
Messages
337
Hi

I'm having difficulty understanding why my LEFT and RIGHT functions aren't doing what I want.

I have a column with addresses and I'm trying to split up certain parts into different columns to mail merge.

Eg in cell A1;
25 Speed Lane Edinburgh Scotland

If I use in B1 =LEFT(A1,FIND(" ",A1,1))
I get the number of the house, which is what I'm looking for.

If I try to get the last part, ie "Scotland"
Eg. =RIGHT(A1,FIND(" ",A1,1))
I don't get the full name but the last two letters only.

In some cells I return three letters of the last town name


Please help with a solution.
 

Excel Facts

When did Power Query debut in Excel?
Although it was an add-in in Excel 2010 & Excel 2013, Power Query became a part of Excel in 2016, in Data, Get & Transform Data.
Try:

=REPLACE(A1,1,SEARCH("@",SUBSTITUTE(A1," ","@",LEN(A1)-LEN(SUBSTITUTE(A1," ","")))),"")

Breaking down =RIGHT(A1,FIND(" ",A1,1)) , you were finding the first space, starting with the first character. That was returning 3, as the space is the third character. So, =RIGHT(A1,FIND(" ",A1,1)) was returning the 3 right most characters (I'm guessing you had a trailing space at the end...)
 
Upvote 0

Forum statistics

Threads
1,214,651
Messages
6,120,744
Members
448,989
Latest member
mariah3

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