A Microsoft Office (Excel, Word) forum. OfficeFrustration

If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

Go Back   Home » OfficeFrustration forum » Microsoft Excel » Worksheet Functions
Site Map Home Register Authors List Search Today's Posts Mark Forums Read  

how to get the middle name



 
 
Thread Tools Display Modes
  #1  
Old December 5th, 2005, 10:30 AM posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: n/a
Default how to get the middle name

how can i get the middle name of "fazain iqbal khan"... i can get the last
name by =(a2,len(a2)-search("#", substitute(a2&" "," ","#",2)))... and first
name=right(a2,find(" ",a2))
  #2  
Old December 5th, 2005, 11:12 PM posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: n/a
Default how to get the middle name

Roger Govier wrote...
Try
=MID(A2,FIND(" ",A2)+1,FIND("#",SUBSTITUTE(A2,
" ","#",2))-FIND("#",SUBSTITUTE(A2," ","#",1))-1)

....

Satisfies the OP's specs, but how would it handle George Herbert Walker
Bush? Or Malcolm X? For names like those,

=MID(A2,FIND(" ",A2)+1,FIND("#",SUBSTITUTE(A2,
" ","#",LEN(A2)-LEN(SUBSTITUTE(A2," ",""))))-FIND(" ",A2))

  #3  
Old December 6th, 2005, 01:26 PM posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: n/a
Default how to get the middle name

Hi

Try
=MID(A2,FIND(" ",A2)+1,FIND("#",SUBSTITUTE(A2,"
","#",2))-FIND("#",SUBSTITUTE(A2," ","#",1))-1)

Regards

Roger Govier


zomex wrote:
how can i get the middle name of "fazain iqbal khan"... i can get the last
name by =(a2,len(a2)-search("#", substitute(a2&" "," ","#",2)))... and first
name=right(a2,find(" ",a2))

 




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Remove middle initial from "first name middle initial" Justin F. General Discussion 15 September 26th, 2005 06:13 PM
Expression to middle name/initial from "Last, First Middle" Tim Running & Setting Up Queries 1 June 24th, 2005 06:28 PM
creating/defining relationship between two tables Giz New Users 2 April 18th, 2005 09:24 PM
creating/defining relationships between two tables Giz Running & Setting Up Queries 3 April 18th, 2005 08:47 PM
Word program for middle school students that works. Robert New Users 2 December 8th, 2004 10:12 AM


All times are GMT +1. The time now is 02:09 PM.


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 OfficeFrustration.
The comments are property of their posters.