HELP - EASY

moosemessier

New Member
Joined
Mar 3, 2002
Messages
11
hi.

i am new. i want to ask someone the functions used for string extraction. i am using excel2000 and have a question.

i am manipulating data in a spreadsheet. i want to learn how to extract a last name at the end of a string and swap with the first.

ex.

William H. Dunham

i used the left,right,search functions but cannot extract dunaham becuase of multiple blanks.

ex - (RIGHT(A2,SEARCH(" ",A2))

returns- . Dunham

because the search is reading left to right and not right to left.

help!?

thanks soooooooo much.
 

Excel Facts

What do {} around a formula in the formula bar mean?
{Formula} means the formula was entered using Ctrl+Shift+Enter signifying an old-style array formula.
On 2002-03-04 13:38, moosemessier wrote:
hi.

i am new. i want to ask someone the functions used for string extraction. i am using excel2000 and have a question.

i am manipulating data in a spreadsheet. i want to learn how to extract a last name at the end of a string and swap with the first.

ex.

William H. Dunham

i used the left,right,search functions but cannot extract dunaham becuase of multiple blanks.

ex - (RIGHT(A2,SEARCH(" ",A2))

returns- . Dunham

because the search is reading left to right and not right to left.

help!?

thanks soooooooo much.

=RIGHT(A2,LEN(A2)-SEARCH("@",SUBSTITUTE(A2," ","@",LEN(A2)-LEN(SUBSTITUTE(A2," ","")))))&", "&LEFT(A2,SEARCH("@",SUBSTITUTE(A2," ","@",LEN(A2)-LEN(SUBSTITUTE(A2," ","")))))

where A2 houses a name entry to be reversed.
 
Upvote 0
On 2002-03-04 13:38, moosemessier wrote:
hi.

i am new. i want to ask someone the functions used for string extraction. i am using excel2000 and have a question.

i am manipulating data in a spreadsheet. i want to learn how to extract a last name at the end of a string and swap with the first.

ex.

William H. Dunham

i used the left,right,search functions but cannot extract dunaham becuase of multiple blanks.

ex - (RIGHT(A2,SEARCH(" ",A2))

returns- . Dunham

because the search is reading left to right and not right to left.

help!?

thanks soooooooo much.

not sure if you want to keep the initial letter, if not use:

=MID(MID(A1,FIND(" ",A1)+1,100),FIND(" ",MID(A1,FIND(" ",A1)+1,100))+1,100)&", "&LEFT(A1,FIND(" ",A1)-1)

this also relies on there always being an intial, if this is not the case you'll have to use the above formula AND:

=MID(A1,FIND(" ",A1)+1,100)&", "&LEFT(A1,FIND(" ",A1)-1)

as two arguements of an if statement.

Any help? I think Aladin's answer is nicer but I thought I'd have a stab.
 
Upvote 0
On 2002-03-05 07:36, moosemessier wrote:
that formula (1st one) works great.

question- how do i use it for the following format?

dunham, michael j.

The formula I proposed does exactly that.

Aladin
 
Upvote 0

Forum statistics

Threads
1,223,375
Messages
6,171,738
Members
452,419
Latest member
mapa

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