Switching order of words (ex: names) in a cell

Nichalia

New Member
Joined
Mar 27, 2012
Messages
1
Hi all, here's what I'm trying to do (and thanks for helping, I'm very stuck):

On one sheet, there is a list of names like this in one column:
Smith (STAFF) Amy L (SALES)
Picard (CAPTAIN) Jean Luc

On another sheet, the names are listed like this:
Amy L Smith(STAFF)
Jean Luc Picard

Ultimately, I need to find a way to let Excel search between the two pages and match up names, and then check the status of each person (Example, Column A has all names and Column B has a status) and report it.

So how can I get Excel to:

1) Strip out / Ignore the information in the ( )...
2) Switch the order of the names so that excel can MATCH the names up?

Major thanks in advance, this has me stuck and Google hasn't been able to help with it (yet!)
 

Excel Facts

Can a formula spear through sheets?
Use =SUM(January:December!E7) to sum E7 on all of the sheets from January through December
First, to get rid of the ()'s including the words within them, select the column, then Ctrl-H to bring up the replace function window, enter (*) in the FindWhat box and leave the ReplaceWith box empty, then click "Replace All". (Make sure you do this on a test copy first).

Then to switch the order of the names, if the name is in cell A1, enter this in a blank cell of the same row and copy down:
=MID(TRIM(A1),SEARCH(" ",TRIM(A1))+1,99)&" "&LEFT(A1,SEARCH(" ",A1)-1)
 
Upvote 0
Alternatively:

=TRIM(MID(SUBSTITUTE(A1,"(",REPT(" ",99)&"("),FIND(")",SUBSTITUTE(A1,"(",REPT(" ",99)&"("))+2,99))&" "&LEFT(A1,FIND(" ",A1)-1)
 
Upvote 0

Forum statistics

Threads
1,223,911
Messages
6,175,325
Members
452,635
Latest member
laura12345

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