![]() | ![]() | ![]() |
| |||||||
| Forums | Register | Groups | Awards | Arcade | Pets | T-Bucks / T-Store | Invite Your Friends | Blogs | Mark Forums Read |
| Microsoft Applications Discussions about Windows and other MS Products such as Office |
![]() |
| | LinkBack | Thread Tools |
| | #1 (permalink) |
| Civilians | Ok, Am trying to split up Full Names in a cell. I got this formula from MS's training section of their website. It works great when the name is John Smith. Problem is when the guy's name is something like John A. Smith. It only recognizes the first space, and counts the last name from there. My names have as many as 2 or 3 spaces (John and Sarah Smith). Can someone please help me? Thanks! Yoni |
|
| | #2 (permalink) |
| Civilians | Hi Try this: =LEFT(A1,FIND("^",SUBSTITUTE(A1," ","^",LEN(A1)-LEN(SUBSTITUTE(A1," ",""))))-1) for the first name/s and this: =RIGHT(A1,LEN(A1)-FIND("^",SUBSTITUTE(A1," ","^",LEN(A1)-LEN(SUBSTITUTE(A1," ",""))))) for the surname. -- Andy. "Stunners" <massuds2000@yahoo.com> wrote in message news:9NJoc.6484$ol3.3719@fe20.usenetserver.com... > Ok, Am trying to split up Full Names in a cell. I got this formula from MS's > training section of their website. > It works great when the name is John Smith. Problem is when the guy's name > is something like John A. Smith. It only recognizes the first space, and > counts the last name from there. > > My names have as many as 2 or 3 spaces (John and Sarah Smith). > Can someone please help me? > > Thanks! > Yoni > > > > |
|
| | #3 (permalink) |
| Civilians | One way =RIGHT(A1,LEN(A1)-SEARCH(CHAR(190),SUBSTITUTE(A1," ",CHAR(190),LEN(A1)-LEN(SUBSTITUTE(A1," ",""))))) that will extract the last name unless there is a JR or II or something, those you need to do manually Assume you extract the last names in column G, now in another column use =SUBSTITUTE(A1,G1,"") and copy down -- Regards, Peo Sjoblom "Stunners" <massuds2000@yahoo.com> wrote in message news:9NJoc.6484$ol3.3719@fe20.usenetserver.com... > Ok, Am trying to split up Full Names in a cell. I got this formula from MS's > training section of their website. > It works great when the name is John Smith. Problem is when the guy's name > is something like John A. Smith. It only recognizes the first space, and > counts the last name from there. > > My names have as many as 2 or 3 spaces (John and Sarah Smith). > Can someone please help me? > > Thanks! > Yoni > > > > |
|
| | #4 (permalink) |
| Civilians | Thanks Man, worked perfectly. Since that seemed to be too easy for you, how about throwing something in there that: If there is only 1 name, we will assume its a first name, so copy it over when checking for first names, and give a blank response for the Last Name. Say, original name is Amanda, Have new First Name field show Amanda, and have the Last Name field be empty (but errorfree). If it too big of a deal, then don't worry about it. Again, huge thanks!! Yoni "Andy B" <andyb@takethisbitout.dawsons.co.uk> wrote in message news:%23thcCgOOEHA.640@TK2MSFTNGP12.phx.gbl... > Hi > > Try this: > =LEFT(A1,FIND("^",SUBSTITUTE(A1," ","^",LEN(A1)-LEN(SUBSTITUTE(A1," > ",""))))-1) > for the first name/s > and this: > =RIGHT(A1,LEN(A1)-FIND("^",SUBSTITUTE(A1," ","^",LEN(A1)-LEN(SUBSTITUTE(A1," > ",""))))) > for the surname. > > -- > Andy. > > > "Stunners" <massuds2000@yahoo.com> wrote in message > news:9NJoc.6484$ol3.3719@fe20.usenetserver.com... > > Ok, Am trying to split up Full Names in a cell. I got this formula from > MS's > > training section of their website. > > It works great when the name is John Smith. Problem is when the guy's name > > is something like John A. Smith. It only recognizes the first space, and > > counts the last name from there. > > > > My names have as many as 2 or 3 spaces (John and Sarah Smith). > > Can someone please help me? > > > > Thanks! > > Yoni > > > > > > > > > > |
|
| | #5 (permalink) |
| Civilians | Thanks, but I already used Andy's answer. "Peo Sjoblom" <terre08@mvp.org> wrote in message news:OU$sklOOEHA.3708@TK2MSFTNGP10.phx.gbl... > One way > > =RIGHT(A1,LEN(A1)-SEARCH(CHAR(190),SUBSTITUTE(A1," > ",CHAR(190),LEN(A1)-LEN(SUBSTITUTE(A1," ",""))))) > > that will extract the last name unless there is a JR or II or something, > those you need to > do manually > > Assume you extract the last names in column G, now in another column use > > =SUBSTITUTE(A1,G1,"") > > and copy down > > -- > > Regards, > > Peo Sjoblom > > > "Stunners" <massuds2000@yahoo.com> wrote in message > news:9NJoc.6484$ol3.3719@fe20.usenetserver.com... > > Ok, Am trying to split up Full Names in a cell. I got this formula from > MS's > > training section of their website. > > It works great when the name is John Smith. Problem is when the guy's name > > is something like John A. Smith. It only recognizes the first space, and > > counts the last name from there. > > > > My names have as many as 2 or 3 spaces (John and Sarah Smith). > > Can someone please help me? > > > > Thanks! > > Yoni > > > > > > > > > > |
|
| | #6 (permalink) |
| Civilians | Hi Try these: =IF(ISERROR(FIND(" ",A1)),A1,LEFT(A1,FIND("^",SUBSTITUTE(A1," ","^",LEN(A1)-LEN(SUBSTITUTE(A1," ",""))))-1)) and =IF(ISERROR(FIND(" ",A1)),"",RIGHT(A1,LEN(A1)-FIND("^",SUBSTITUTE(A1," ","^",LEN(A1)-LEN(SUBSTITUTE(A1," ","")))))) -- Andy. "Stunners" <massuds2000@yahoo.com> wrote in message news:xhKoc.14098$8P4.5891@fe09.usenetserver.com... > Thanks Man, worked perfectly. > Since that seemed to be too easy for you, how about throwing something in > there that: > If there is only 1 name, we will assume its a first name, so copy it over > when checking for first names, and give a blank response for the Last Name. > > Say, original name is Amanda, Have new First Name field show Amanda, and > have the Last Name field be empty (but errorfree). > > If it too big of a deal, then don't worry about it. > Again, huge thanks!! > Yoni > "Andy B" <andyb@takethisbitout.dawsons.co.uk> wrote in message > news:%23thcCgOOEHA.640@TK2MSFTNGP12.phx.gbl... > > Hi > > > > Try this: > > =LEFT(A1,FIND("^",SUBSTITUTE(A1," ","^",LEN(A1)-LEN(SUBSTITUTE(A1," > > ",""))))-1) > > for the first name/s > > and this: > > =RIGHT(A1,LEN(A1)-FIND("^",SUBSTITUTE(A1," > ","^",LEN(A1)-LEN(SUBSTITUTE(A1," > > ",""))))) > > for the surname. > > > > -- > > Andy. > > > > > > "Stunners" <massuds2000@yahoo.com> wrote in message > > news:9NJoc.6484$ol3.3719@fe20.usenetserver.com... > > > Ok, Am trying to split up Full Names in a cell. I got this formula from > > MS's > > > training section of their website. > > > It works great when the name is John Smith. Problem is when the guy's > name > > > is something like John A. Smith. It only recognizes the first space, and > > > counts the last name from there. > > > > > > My names have as many as 2 or 3 spaces (John and Sarah Smith). > > > Can someone please help me? > > > > > > Thanks! > > > Yoni > > > > > > > > > > > > > > > > > > > |
|
| | #7 (permalink) |
| Civilians | Thanks "Andy B" <andyb@takethisbitout.dawsons.co.uk> wrote in message news:OMstIvOOEHA.2468@TK2MSFTNGP11.phx.gbl... > Hi > > Try these: > =IF(ISERROR(FIND(" ",A1)),A1,LEFT(A1,FIND("^",SUBSTITUTE(A1," > ","^",LEN(A1)-LEN(SUBSTITUTE(A1," ",""))))-1)) > > and > > =IF(ISERROR(FIND(" ",A1)),"",RIGHT(A1,LEN(A1)-FIND("^",SUBSTITUTE(A1," > ","^",LEN(A1)-LEN(SUBSTITUTE(A1," ","")))))) > > -- > Andy. > > > "Stunners" <massuds2000@yahoo.com> wrote in message > news:xhKoc.14098$8P4.5891@fe09.usenetserver.com... > > Thanks Man, worked perfectly. > > Since that seemed to be too easy for you, how about throwing something in > > there that: > > If there is only 1 name, we will assume its a first name, so copy it over > > when checking for first names, and give a blank response for the Last > Name. > > > > Say, original name is Amanda, Have new First Name field show Amanda, and > > have the Last Name field be empty (but errorfree). > > > > If it too big of a deal, then don't worry about it. > > Again, huge thanks!! > > Yoni > > "Andy B" <andyb@takethisbitout.dawsons.co.uk> wrote in message > > news:%23thcCgOOEHA.640@TK2MSFTNGP12.phx.gbl... > > > Hi > > > > > > Try this: > > > =LEFT(A1,FIND("^",SUBSTITUTE(A1," ","^",LEN(A1)-LEN(SUBSTITUTE(A1," > > > ",""))))-1) > > > for the first name/s > > > and this: > > > =RIGHT(A1,LEN(A1)-FIND("^",SUBSTITUTE(A1," > > ","^",LEN(A1)-LEN(SUBSTITUTE(A1," > > > ",""))))) > > > for the surname. > > > > > > -- > > > Andy. > > > > > > > > > "Stunners" <massuds2000@yahoo.com> wrote in message > > > news:9NJoc.6484$ol3.3719@fe20.usenetserver.com... > > > > Ok, Am trying to split up Full Names in a cell. I got this formula > from > > > MS's > > > > training section of their website. > > > > It works great when the name is John Smith. Problem is when the guy's > > name > > > > is something like John A. Smith. It only recognizes the first space, > and > > > > counts the last name from there. > > > > > > > > My names have as many as 2 or 3 spaces (John and Sarah Smith). > > > > Can someone please help me? > > > > > > > > Thanks! > > > > Yoni > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > |
|
![]() |
| Bookmarks |
| Thread Tools | |
| |
Similar Threads | ||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Find God to Find One's True Self | Snowden | Prayer & Religious Discussion | 0 | 01-31-2008 10:10 |
| [MV] Can someone help me find............. | Chris Somers | MV List | 0 | 04-22-2006 00:28 |
| Re: Find all and Sum | Cutter | Microsoft Applications | 1 | 09-06-2005 12:00 |
| Just want to find out How does one become MVP. | =?Utf-8?B?QWpheSBLdW1hcg==?= | Microsoft Applications | 2 | 07-14-2004 15:55 |
| FIND in VBA | Jan | Microsoft Applications | 4 | 06-16-2004 00:56 |
![]() | ![]() | ![]() |