![]() |
Remove initial from end of name
I have browsed the questions to remove the middle initial from the name cell
and see the response if the middle initial is in the middle of the name in one cell. The problem I have is the middle initial is at the end of the names. eg Smith, John J. I need to have Smith, John in one cell and remove the J. In some cases there may be a J. Jr. Any help would be appreciated Kathy |
Answer: Remove initial from end of name
Hi Kathy,
To remove the middle initial from the end of the name, you can use the Code:
LEFT Code:
FIND
If there are cases where there is a suffix like "Jr." at the end of the name, you can modify the formula to remove it as well. For example, if the suffix is always two characters, you can use the following formula instead: Code:
=LEFT(A1,FIND(",",A1)-3) |
Remove initial from end of name
If it is always that format
=LEFT(A11,FIND(" ",A11,FIND(",",A11)+2)) =SUBSTITUTE(A11,B11,"") -- HTH Bob (there's no email, no snail mail, but somewhere should be gmail in my addy) "kswan" wrote in message ... I have browsed the questions to remove the middle initial from the name cell and see the response if the middle initial is in the middle of the name in one cell. The problem I have is the middle initial is at the end of the names. eg Smith, John J. I need to have Smith, John in one cell and remove the J. In some cases there may be a J. Jr. Any help would be appreciated Kathy |
Remove initial from end of name
I have browsed the questions to remove the middle initial from the name
cell and see the response if the middle initial is in the middle of the name in one cell. The problem I have is the middle initial is at the end of the names. eg Smith, John J. I need to have Smith, John in one cell and remove the J. In some cases there may be a J. Jr. This will do what you asked =LEFT(A19,FIND(" ",A19,1+FIND(" ",A19))-1) but there are many name combinations that will fool it. For example, I have a friend whose first name is Mary Anne (a two word name with a space in the middle). Also, I once worked with a person named Frank Della Rossa... Della Rossa (two words with a space in the middle) was his last name. When it comes to names, there really isn't any hard and fast rules that will work for all of them. Rick |
Remove initial from end of name
Thanks Bob,
It works for all cases where there is a middle initial at the end of the name but in some cases there is no middle initial just the name. What happens when I apply the formula below I get #value for those people who have no middle initial Any advise. Thanks again "Bob Phillips" wrote: If it is always that format =LEFT(A11,FIND(" ",A11,FIND(",",A11)+2)) =SUBSTITUTE(A11,B11,"") -- HTH Bob (there's no email, no snail mail, but somewhere should be gmail in my addy) "kswan" wrote in message ... I have browsed the questions to remove the middle initial from the name cell and see the response if the middle initial is in the middle of the name in one cell. The problem I have is the middle initial is at the end of the names. eg Smith, John J. I need to have Smith, John in one cell and remove the J. In some cases there may be a J. Jr. Any help would be appreciated Kathy |
Remove initial from end of name
I have browsed the questions to remove the middle initial from the name
cell and see the response if the middle initial is in the middle of the name in one cell. The problem I have is the middle initial is at the end of the names. eg Smith, John J. I need to have Smith, John in one cell and remove the J. In some cases there may be a J. Jr. This will do what you asked =LEFT(A19,FIND(" ",A19,1+FIND(" ",A19))-1) but there are many name combinations that will fool it. For example, I have a friend whose first name is Mary Anne (a two word name with a space in the middle). Also, I once worked with a person named Frank Della Rossa... Della Rossa (two words with a space in the middle) was his last name. When it comes to names, there really isn't any hard and fast rules that will work for all of them. Bob had a good idea picking up on that comma... here is my formula modified to take that into account... =LEFT(A19,FIND(" ",A19,2+FIND(", ",A19))-1) This would solve the double last name issue, but you are still left with the double first name problem. Rick |
Remove initial from end of name
Thanks to both of you.
Do I need to turn this into an If statement to account for those that do not have a middle initial at the end of their name. "Rick Rothstein (MVP - VB)" wrote: I have browsed the questions to remove the middle initial from the name cell and see the response if the middle initial is in the middle of the name in one cell. The problem I have is the middle initial is at the end of the names. eg Smith, John J. I need to have Smith, John in one cell and remove the J. In some cases there may be a J. Jr. This will do what you asked =LEFT(A19,FIND(" ",A19,1+FIND(" ",A19))-1) but there are many name combinations that will fool it. For example, I have a friend whose first name is Mary Anne (a two word name with a space in the middle). Also, I once worked with a person named Frank Della Rossa... Della Rossa (two words with a space in the middle) was his last name. When it comes to names, there really isn't any hard and fast rules that will work for all of them. Bob had a good idea picking up on that comma... here is my formula modified to take that into account... =LEFT(A19,FIND(" ",A19,2+FIND(", ",A19))-1) This would solve the double last name issue, but you are still left with the double first name problem. Rick |
Remove initial from end of name
Use this for the first then
=IF(ISNUMBER(FIND(" ",A11,FIND(",",A11)+2)),LEFT(A11,FIND(" ",A11,FIND(",",A11)+2)),A11) -- HTH Bob (there's no email, no snail mail, but somewhere should be gmail in my addy) "kswan" wrote in message ... Thanks Bob, It works for all cases where there is a middle initial at the end of the name but in some cases there is no middle initial just the name. What happens when I apply the formula below I get #value for those people who have no middle initial Any advise. Thanks again "Bob Phillips" wrote: If it is always that format =LEFT(A11,FIND(" ",A11,FIND(",",A11)+2)) =SUBSTITUTE(A11,B11,"") -- HTH Bob (there's no email, no snail mail, but somewhere should be gmail in my addy) "kswan" wrote in message ... I have browsed the questions to remove the middle initial from the name cell and see the response if the middle initial is in the middle of the name in one cell. The problem I have is the middle initial is at the end of the names. eg Smith, John J. I need to have Smith, John in one cell and remove the J. In some cases there may be a J. Jr. Any help would be appreciated Kathy |
Remove initial from end of name
Yes, you would need an IF statement then. Here is my formula modified for
this... =IF(LEN(A1)-LEN(SUBSTITUTE(A1," ",""))1,LEFT(A1,FIND(" ",A19,2+FIND(", ",A1))-1),A1) Rick "kswan" wrote in message ... Thanks to both of you. Do I need to turn this into an If statement to account for those that do not have a middle initial at the end of their name. "Rick Rothstein (MVP - VB)" wrote: I have browsed the questions to remove the middle initial from the name cell and see the response if the middle initial is in the middle of the name in one cell. The problem I have is the middle initial is at the end of the names. eg Smith, John J. I need to have Smith, John in one cell and remove the J. In some cases there may be a J. Jr. This will do what you asked =LEFT(A19,FIND(" ",A19,1+FIND(" ",A19))-1) but there are many name combinations that will fool it. For example, I have a friend whose first name is Mary Anne (a two word name with a space in the middle). Also, I once worked with a person named Frank Della Rossa... Della Rossa (two words with a space in the middle) was his last name. When it comes to names, there really isn't any hard and fast rules that will work for all of them. Bob had a good idea picking up on that comma... here is my formula modified to take that into account... =LEFT(A19,FIND(" ",A19,2+FIND(", ",A19))-1) This would solve the double last name issue, but you are still left with the double first name problem. Rick |
Remove initial from end of name
Thanks Rick
That worked great. Kathy "Rick Rothstein (MVP - VB)" wrote: Yes, you would need an IF statement then. Here is my formula modified for this... =IF(LEN(A1)-LEN(SUBSTITUTE(A1," ",""))1,LEFT(A1,FIND(" ",A19,2+FIND(", ",A1))-1),A1) Rick "kswan" wrote in message ... Thanks to both of you. Do I need to turn this into an If statement to account for those that do not have a middle initial at the end of their name. "Rick Rothstein (MVP - VB)" wrote: I have browsed the questions to remove the middle initial from the name cell and see the response if the middle initial is in the middle of the name in one cell. The problem I have is the middle initial is at the end of the names. eg Smith, John J. I need to have Smith, John in one cell and remove the J. In some cases there may be a J. Jr. This will do what you asked =LEFT(A19,FIND(" ",A19,1+FIND(" ",A19))-1) but there are many name combinations that will fool it. For example, I have a friend whose first name is Mary Anne (a two word name with a space in the middle). Also, I once worked with a person named Frank Della Rossa... Della Rossa (two words with a space in the middle) was his last name. When it comes to names, there really isn't any hard and fast rules that will work for all of them. Bob had a good idea picking up on that comma... here is my formula modified to take that into account... =LEFT(A19,FIND(" ",A19,2+FIND(", ",A19))-1) This would solve the double last name issue, but you are still left with the double first name problem. Rick |
All times are GMT +1. The time now is 02:54 AM. |
Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com