Position of characters

arjethi

New Member
Joined
Jan 16, 2011
Messages
2
Hey, I have a question if I have a column like the following

John Smith
Jacob Crosby (Leader)
Doug Johnson

Is there any combinations of functions which will allow me to find the position of the character of the last name for all names? For instance I've used functions but they give me the position of the ) on the (Leader) where as I just want the position of the y.

Thanks
 

Excel Facts

Who is Mr Spreadsheet?
Author John Walkenbach was Mr Spreadsheet until his retirement in June 2019.
This will return the location of the character immediately before the second space in a string. If A1 holds "Jacob Crosby (Leader)"

=FIND(CHAR(5), SUBSTITUTE(A1 & " ", " ", CHAR(5), 2))-1 returns 12 and

=MID(A1, FIND(CHAR(5), SUBSTITUTE(A1 & " ", " ", CHAR(5), 2))-1, 1) returns "y"

The underlined string constants (A1 & " ") are two spaces.
 
Last edited:
Upvote 0
If you want to key on the "(" rather than the second space, you might use

=LEN(TRIM(LEFT(A1, FIND(CHAR(5), SUBSTITUTE(A1&"(", "(", CHAR(5)))-1)))
 
Upvote 0
The second one didn't seem to work unless I messed up something while inputting, the first set of functions were perfect however. Another question I have is, a function which would allow me to find the length of just the last name.

=LEN(REPLACE(A5,1,FIND(" ",A5),"")), this one works however again it includes the brackets in the length.


Thanks.
 
Upvote 0
The second one didn't seem to work unless I messed up something while inputting, the first set of functions were perfect however. Another question I have is, a function which would allow me to find the length of just the last name.

=LEN(REPLACE(A5,1,FIND(" ",A5),"")), this one works however again it includes the brackets in the length.


Thanks.

Try...

=LEN(TRIM(REPLACE(LEFT(A5,FIND("(",A5&"(")-1),1,FIND(" ",A5),"")))
 
Upvote 0

Forum statistics

Threads
1,221,418
Messages
6,159,793
Members
451,589
Latest member
Harold14

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