Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.misc
|
|||
|
|||
![]()
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 |
#2
![]() |
|||
|
|||
![]()
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)
__________________
I am not human. I am an Excel Wizard |
#3
![]()
Posted to microsoft.public.excel.misc
|
|||
|
|||
![]()
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 |
#4
![]()
Posted to microsoft.public.excel.misc
|
|||
|
|||
![]()
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 |
#5
![]()
Posted to microsoft.public.excel.misc
|
|||
|
|||
![]()
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 |
#6
![]()
Posted to microsoft.public.excel.misc
|
|||
|
|||
![]()
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 |
#7
![]()
Posted to microsoft.public.excel.misc
|
|||
|
|||
![]()
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 |
#8
![]()
Posted to microsoft.public.excel.misc
|
|||
|
|||
![]()
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 |
#9
![]()
Posted to microsoft.public.excel.misc
|
|||
|
|||
![]()
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 |
#10
![]()
Posted to microsoft.public.excel.misc
|
|||
|
|||
![]()
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 |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Last initial | Excel Discussion (Misc queries) | |||
Remove middle initial from "first name middle initial" | Excel Discussion (Misc queries) | |||
First name, Middle Initial | Excel Discussion (Misc queries) | |||
Initial Formula Calculation | Excel Discussion (Misc queries) | |||
Extracting Last Name and First Initial | New Users to Excel |