Search for " " (space) from RIGHT

paddy100

New Member
Joined
Apr 29, 2009
Messages
23
Hopefully someone can help. I have a column of cells (Column D) within a worksheet with all the users taken from Active Directory. The data within the cell is in the format

Lastname, Firstname Title

I would like to separate the title and move it to another cell. The formula
Code:
=RIGHT(A2,LEN(A2)-SEARCH(" ",A2,SEARCH(" ",A2,1)+1))
is fine for this however we have several people with double barrelled names in the format

Lastame Lastame, Firstname Title
Lastame Lastame Lastname, Firstname Title

How can I separate the title only with these different variations of names? After days of searching I haven’t been able to find one.
Any and all help is greatly appreciated.

Paddy
 

Excel Facts

Copy PDF to Excel
Select data in PDF. Paste to Microsoft Word. Copy from Word and paste to Excel.
Hi

Using the formula you posted:

=RIGHT(A1,LEN(A1)-SEARCH(" ",A1,SEARCH(",",A1,1)+2))
 
Upvote 0
pgc01,
Thanks for the reply, but I was looking for one formula that would suit all variations.
Code:
=TRIM(RIGHT(SUBSTITUTE(A1," ",REPT(" ",255)),255))
is exactly what I needed.
 
Upvote 0
pgc01,
Thanks for the reply, but I was looking for one formula that would suit all variations.

Hi Paddy

I based the solution in your examples:

Lastname, Firstname Title
Lastame Lastame, Firstname Title
Lastame Lastame Lastname, Firstname Title
 
Upvote 0

Forum statistics

Threads
1,224,550
Messages
6,179,459
Members
452,915
Latest member
hannnahheileen

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