LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 12
Default Extract Middle Initial from Name

Hello,

I have a list of names; some of which contain the fistname, middle initial,
and last name. The other names in the list are only first and last names. For
example: John T. Doe and John Doe. I need to extract the middle intial and
the period after the MI so that I end up with a list of names with just the
first name and last name. I have the formula below that will work
successfully to remove the "MI.":
=LEFT(B7,FIND(" ",B7))&RIGHT(B7,LEN(B7)-FIND(".",B7))
But when I try to wrap the above formula in an IF statement so that it will
state; "if the name in the cell contains a period then remove it and return
just the FN & LN; if there is no period then just return the name in the
cell. Here is the formula that I have tried to use to accomplish this:
=IF(FIND(B5,".")0,LEFT(B5,FIND(" ",B5))&RIGHT(B5,LEN(B5)-FIND(".",B5)),B5)
Unfortunately I get a #VALUE error with this formula. I feel like I am close
but at this point am stumped on how to get past this error. Any help or
suggestions on how to accomplish my task will be greatly appreciated. Thank
you.

Dave
 
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Separate Middle Initial From First Name Charles Excel Discussion (Misc queries) 9 March 9th 06 09:08 AM
Remove middle initial from "first name middle initial" Justin F. Excel Discussion (Misc queries) 15 September 26th 05 06:13 PM
First name, Middle Initial wnfisba Excel Discussion (Misc queries) 2 September 21st 05 03:03 PM
Stripping Middle Initial from a Name mira Excel Worksheet Functions 13 August 6th 05 08:46 PM
Extract middle initial rocket0612 Excel Discussion (Misc queries) 4 July 5th 05 09:05 AM


All times are GMT +1. The time now is 10:42 PM.

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

About Us

"It's about Microsoft Excel"