Find Function Question

Mr Walker

Board Regular
Joined
Jan 21, 2003
Messages
131
Is there a way to find the position of the first space from the right in a string of text.

Eg James Francis Gray.

I'd like to be able to return a value of Gray, James Francis.

Thanks in advance for any help. :)
 

Excel Facts

Who is Mr Spreadsheet?
Author John Walkenbach was Mr Spreadsheet until his retirement in June 2019.
Hello Mr Walker:

Look at the following simulation for the situation where there are two space characters in the name.
Book1
ABCD
1JamesFrancisGrayGray,JamesFrancis
Sheet3


If you need a solution for a different condition, post back with more details and let us take it from there.
 
Upvote 0
Hello, I know this is resolved, but I'd still like to throw up the following:
Parse Names.xls
ABCD
1JamesFrancisGrayGray,JamesFrancis
2RoseSarah-JaneOlsonOlson,RoseSarah-Jane
3MikeB.ClarkGriswaldGriswald,MikeB.Clark
4JoeClarkClark,Joe
5TestThisPleaseThanksThanks,TestThisPlease
6RobertWDowneyJr.DowneyJr.,RobertW
7JoePaulDirtIVDirtIV,JoePaul
8AlanMichaelStephanJordanIIIJordanIII,AlanMichaelStephan
9JohnDoeVDoeV,John
NameParse


Edit: The function didn't come out so well above, it looks like:

Code:
=RIGHT(A1,LEN(A1)-FIND(CHAR(1),SUBSTITUTE(A1," ",CHAR(1),LEN(A1)-LEN(SUBSTITUTE(A1," ",""))-MIN(SUMPRODUCT((LEN(A1)-LEN(SUBSTITUTE(A1,{"Jr","III","IV","V","VI"},"")))),1))))&", "&SUBSTITUTE(A1," " &RIGHT(A1,LEN(A1)-FIND(CHAR(1),SUBSTITUTE(A1," ",CHAR(1),LEN(A1)-LEN(SUBSTITUTE(A1," ",""))-MIN(SUMPRODUCT((LEN(A1)-LEN(SUBSTITUTE(A1,{"Jr","III","IV","V","VI"},"")))),1)))),"")

For A1 (single line obviously).
 
Upvote 0

Forum statistics

Threads
1,214,936
Messages
6,122,340
Members
449,079
Latest member
rocketslinger

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