#1   Report Post  
Posted to microsoft.public.excel.misc
Mike Rogers
 
Posts: n/a
Default Last initial

I am trying to figure out how to extract intials from a name.
The names are in one column in the format of "Frank A Right". I have the
first initial extracted and the middle initial extracted, but I can't seem to
get the first letter of the last name. So far I have:
=UPPER(LEFT(A1,1)&MID(A1,FIND(" ",A1)+1,1)). What would I add to this to get
the last initial?

Thanks
Mike Rogers
  #2   Report Post  
Posted to microsoft.public.excel.misc
Biff
 
Posts: n/a
Default Last initial

Hi!

Try this:

=UPPER(LEFT(A1)&MID(A1,FIND(" ",A1)+1,1)&MID(A1,FIND(" ",A1,FIND("
",A1)+1)+1,1))

Biff

"Mike Rogers" wrote in message
...
I am trying to figure out how to extract intials from a name.
The names are in one column in the format of "Frank A Right". I have the
first initial extracted and the middle initial extracted, but I can't seem
to
get the first letter of the last name. So far I have:
=UPPER(LEFT(A1,1)&MID(A1,FIND(" ",A1)+1,1)). What would I add to this to
get
the last initial?

Thanks
Mike Rogers



  #3   Report Post  
Posted to microsoft.public.excel.misc
Biff
 
Posts: n/a
Default Last initial

In case of line wrap: (which I see in OE)

The last FIND function has a space between the quotes:

...........FIND(" ",A1)+1)+1,1))

Biff

"Biff" wrote in message
...
Hi!

Try this:

=UPPER(LEFT(A1)&MID(A1,FIND(" ",A1)+1,1)&MID(A1,FIND(" ",A1,FIND("
",A1)+1)+1,1))

Biff

"Mike Rogers" wrote in message
...
I am trying to figure out how to extract intials from a name.
The names are in one column in the format of "Frank A Right". I have the
first initial extracted and the middle initial extracted, but I can't
seem to
get the first letter of the last name. So far I have:
=UPPER(LEFT(A1,1)&MID(A1,FIND(" ",A1)+1,1)). What would I add to this to
get
the last initial?

Thanks
Mike Rogers





  #4   Report Post  
Posted to microsoft.public.excel.misc
Mike Rogers
 
Posts: n/a
Default Last initial

Biff

Now how do I get rid of the #Value! error if A1 is empty?

Mike Rogers

"Biff" wrote:

In case of line wrap: (which I see in OE)

The last FIND function has a space between the quotes:

...........FIND(" ",A1)+1)+1,1))

Biff

"Biff" wrote in message
...
Hi!

Try this:

=UPPER(LEFT(A1)&MID(A1,FIND(" ",A1)+1,1)&MID(A1,FIND(" ",A1,FIND("
",A1)+1)+1,1))

Biff

"Mike Rogers" wrote in message
...
I am trying to figure out how to extract intials from a name.
The names are in one column in the format of "Frank A Right". I have the
first initial extracted and the middle initial extracted, but I can't
seem to
get the first letter of the last name. So far I have:
=UPPER(LEFT(A1,1)&MID(A1,FIND(" ",A1)+1,1)). What would I add to this to
get
the last initial?

Thanks
Mike Rogers






  #5   Report Post  
Posted to microsoft.public.excel.misc
Mike Rogers
 
Posts: n/a
Default Last initial

Biff

Works like you knew it would. I knew I had to look for the second space but
never would have figured that out. I will study it and try to figure out the
)+1)+1,1)) stuff. Thanks a million for the help!!!

Mike Rogers

"Biff" wrote:

Hi!

Try this:

=UPPER(LEFT(A1)&MID(A1,FIND(" ",A1)+1,1)&MID(A1,FIND(" ",A1,FIND("
",A1)+1)+1,1))

Biff

"Mike Rogers" wrote in message
...
I am trying to figure out how to extract intials from a name.
The names are in one column in the format of "Frank A Right". I have the
first initial extracted and the middle initial extracted, but I can't seem
to
get the first letter of the last name. So far I have:
=UPPER(LEFT(A1,1)&MID(A1,FIND(" ",A1)+1,1)). What would I add to this to
get
the last initial?

Thanks
Mike Rogers






  #6   Report Post  
Posted to microsoft.public.excel.misc
Mike Rogers
 
Posts: n/a
Default Last initial

I figured it out, I used an "IF" with "ISTEXT" to test the cell first.
Thanks for all the help.

Mike Rogers

"Mike Rogers" wrote:

Biff

Works like you knew it would. I knew I had to look for the second space but
never would have figured that out. I will study it and try to figure out the
)+1)+1,1)) stuff. Thanks a million for the help!!!

Mike Rogers

"Biff" wrote:

Hi!

Try this:

=UPPER(LEFT(A1)&MID(A1,FIND(" ",A1)+1,1)&MID(A1,FIND(" ",A1,FIND("
",A1)+1)+1,1))

Biff

"Mike Rogers" wrote in message
...
I am trying to figure out how to extract intials from a name.
The names are in one column in the format of "Frank A Right". I have the
first initial extracted and the middle initial extracted, but I can't seem
to
get the first letter of the last name. So far I have:
=UPPER(LEFT(A1,1)&MID(A1,FIND(" ",A1)+1,1)). What would I add to this to
get
the last initial?

Thanks
Mike Rogers




  #7   Report Post  
Posted to microsoft.public.excel.misc
Damon Longworth
 
Posts: n/a
Default Last initial

Try:

=UPPER(LEFT(A1,1)&MID(A1,FIND(" ",A1)+1,1)&MID(A1,FIND(" ",A1,1)+3,1))

--
Damon Longworth

2006 East Coast Excel User Conference
April 19/21st, 2006
Holiday Inn, Boardwalk
Atlantic City, New Jersey
Early Bird Registration Now Open!!
www.ExcelUserConference.com

2006 UK Excel User Conference
Summer, 2006
London, England





"Mike Rogers" wrote in message
...
I am trying to figure out how to extract intials from a name.
The names are in one column in the format of "Frank A Right". I have the
first initial extracted and the middle initial extracted, but I can't seem
to
get the first letter of the last name. So far I have:
=UPPER(LEFT(A1,1)&MID(A1,FIND(" ",A1)+1,1)). What would I add to this to
get
the last initial?

Thanks
Mike Rogers


  #8   Report Post  
Posted to microsoft.public.excel.misc
Mike Rogers
 
Posts: n/a
Default Last initial

Damon

Work great, thanks for the help. One more thing, how do I get rid of the
#value! error when A1 is empty?

Mike Rogers

"Damon Longworth" wrote:

Try:

=UPPER(LEFT(A1,1)&MID(A1,FIND(" ",A1)+1,1)&MID(A1,FIND(" ",A1,1)+3,1))

--
Damon Longworth

2006 East Coast Excel User Conference
April 19/21st, 2006
Holiday Inn, Boardwalk
Atlantic City, New Jersey
Early Bird Registration Now Open!!
www.ExcelUserConference.com

2006 UK Excel User Conference
Summer, 2006
London, England





"Mike Rogers" wrote in message
...
I am trying to figure out how to extract intials from a name.
The names are in one column in the format of "Frank A Right". I have the
first initial extracted and the middle initial extracted, but I can't seem
to
get the first letter of the last name. So far I have:
=UPPER(LEFT(A1,1)&MID(A1,FIND(" ",A1)+1,1)). What would I add to this to
get
the last initial?

Thanks
Mike Rogers



  #9   Report Post  
Posted to microsoft.public.excel.misc
Damon Longworth
 
Posts: n/a
Default Last initial

Wrap the formula in an IF statement. Something similar to:

=if(iserror(YourFormula),"",YourFormula)

--
Damon Longworth

2006 East Coast Excel User Conference
April 19/21st, 2006
Holiday Inn, Boardwalk
Atlantic City, New Jersey
Early Bird Registration Now Open!!
www.ExcelUserConference.com

2006 UK Excel User Conference
Summer, 2006
London, England
"Mike Rogers" wrote in message
...
Damon

Work great, thanks for the help. One more thing, how do I get rid of the
#value! error when A1 is empty?

Mike Rogers

"Damon Longworth" wrote:

Try:

=UPPER(LEFT(A1,1)&MID(A1,FIND(" ",A1)+1,1)&MID(A1,FIND(" ",A1,1)+3,1))

--
Damon Longworth

2006 East Coast Excel User Conference
April 19/21st, 2006
Holiday Inn, Boardwalk
Atlantic City, New Jersey
Early Bird Registration Now Open!!
www.ExcelUserConference.com

2006 UK Excel User Conference
Summer, 2006
London, England





"Mike Rogers" wrote in message
...
I am trying to figure out how to extract intials from a name.
The names are in one column in the format of "Frank A Right". I have the
first initial extracted and the middle initial extracted, but I can't seem
to
get the first letter of the last name. So far I have:
=UPPER(LEFT(A1,1)&MID(A1,FIND(" ",A1)+1,1)). What would I add to this to
get
the last initial?

Thanks
Mike Rogers





  #10   Report Post  
Posted to microsoft.public.excel.misc
Mike Rogers
 
Posts: n/a
Default Last initial

Damon

Thanks for the followup

Mike Rogers

"Damon Longworth" wrote:

Wrap the formula in an IF statement. Something similar to:

=if(iserror(YourFormula),"",YourFormula)

--
Damon Longworth

2006 East Coast Excel User Conference
April 19/21st, 2006
Holiday Inn, Boardwalk
Atlantic City, New Jersey
Early Bird Registration Now Open!!
www.ExcelUserConference.com

2006 UK Excel User Conference
Summer, 2006
London, England
"Mike Rogers" wrote in message
...
Damon

Work great, thanks for the help. One more thing, how do I get rid of the
#value! error when A1 is empty?

Mike Rogers

"Damon Longworth" wrote:

Try:

=UPPER(LEFT(A1,1)&MID(A1,FIND(" ",A1)+1,1)&MID(A1,FIND(" ",A1,1)+3,1))

--
Damon Longworth

2006 East Coast Excel User Conference
April 19/21st, 2006
Holiday Inn, Boardwalk
Atlantic City, New Jersey
Early Bird Registration Now Open!!
www.ExcelUserConference.com

2006 UK Excel User Conference
Summer, 2006
London, England





"Mike Rogers" wrote in message
...
I am trying to figure out how to extract intials from a name.
The names are in one column in the format of "Frank A Right". I have the
first initial extracted and the middle initial extracted, but I can't seem
to
get the first letter of the last name. So far I have:
=UPPER(LEFT(A1,1)&MID(A1,FIND(" ",A1)+1,1)). What would I add to this to
get
the last initial?

Thanks
Mike Rogers








  #11   Report Post  
Posted to microsoft.public.excel.misc
Mike Rogers
 
Posts: n/a
Default Last initial

Got it, I used "IF" and "ISTEXT" to test the cell first, and it works.

Thanks again for the help

Mike Rogers

"Mike Rogers" wrote:

Damon

Work great, thanks for the help. One more thing, how do I get rid of the
#value! error when A1 is empty?

Mike Rogers

"Damon Longworth" wrote:

Try:

=UPPER(LEFT(A1,1)&MID(A1,FIND(" ",A1)+1,1)&MID(A1,FIND(" ",A1,1)+3,1))

--
Damon Longworth

2006 East Coast Excel User Conference
April 19/21st, 2006
Holiday Inn, Boardwalk
Atlantic City, New Jersey
Early Bird Registration Now Open!!
www.ExcelUserConference.com

2006 UK Excel User Conference
Summer, 2006
London, England





"Mike Rogers" wrote in message
...
I am trying to figure out how to extract intials from a name.
The names are in one column in the format of "Frank A Right". I have the
first initial extracted and the middle initial extracted, but I can't seem
to
get the first letter of the last name. So far I have:
=UPPER(LEFT(A1,1)&MID(A1,FIND(" ",A1)+1,1)). What would I add to this to
get
the last initial?

Thanks
Mike Rogers



  #12   Report Post  
Posted to microsoft.public.excel.misc
Ron Rosenfeld
 
Posts: n/a
Default Last initial

On Fri, 27 Jan 2006 19:55:26 -0800, "Mike Rogers"
wrote:

I am trying to figure out how to extract intials from a name.
The names are in one column in the format of "Frank A Right". I have the
first initial extracted and the middle initial extracted, but I can't seem to
get the first letter of the last name. So far I have:
=UPPER(LEFT(A1,1)&MID(A1,FIND(" ",A1)+1,1)). What would I add to this to get
the last initial?

Thanks
Mike Rogers


If you want a simpler formula, you could download and install Longre's free
morefunc.xll add-in from http://xcell05.free.fr/

And then use a regular expression and his MCONCAT function:

=MCONCAT(REGEX.MID(A1,"\b\w",{1,2,3}))

It will return null strings for any absent entries instead of errors.


--ron
  #13   Report Post  
Posted to microsoft.public.excel.misc
daddylonglegs
 
Posts: n/a
Default Last initial


If all your names follow the format

firstname space singleinitial space lastname

then you can use this formula which will return a blank if A1 is blank

=UPPER(MID(A1,SEARCH(" ? ",A1&" x ")+3,1))

More generally if you want to return the first letter (in upper case)
of the last word in a text string (as in your case) irrespective of
what goes before you could use

=UPPER(LEFT(TRIM(RIGHT(SUBSTITUTE(TRIM(A1)," ",REPT(" ",99)),99))))

which also returns blank if A1 is blank


--
daddylonglegs
------------------------------------------------------------------------
daddylonglegs's Profile: http://www.excelforum.com/member.php...o&userid=30486
View this thread: http://www.excelforum.com/showthread...hreadid=505962

  #14   Report Post  
Posted to microsoft.public.excel.misc
Ron Rosenfeld
 
Posts: n/a
Default Last initial

On Sat, 28 Jan 2006 06:35:15 -0600, daddylonglegs
wrote:


If all your names follow the format

firstname space singleinitial space lastname

then you can use this formula which will return a blank if A1 is blank

=UPPER(MID(A1,SEARCH(" ? ",A1&" x ")+3,1))

More generally if you want to return the first letter (in upper case)
of the last word in a text string (as in your case) irrespective of
what goes before you could use

=UPPER(LEFT(TRIM(RIGHT(SUBSTITUTE(TRIM(A1)," ",REPT(" ",99)),99))))

which also returns blank if A1 is blank



Of course, that only returns the initial of the last name.

To return all three initials concatenated together, as was apparent from the
OP's initial posting, would require a much longer conventional formula, which
would be more difficult to adapt to the various possible naming configurations.

That's one of the advantages of regular expressions.


--ron
  #15   Report Post  
Posted to microsoft.public.excel.misc
daddylonglegs
 
Posts: n/a
Default Last initial


Ron Rosenfeld Wrote:


Of course, that only returns the initial of the last name.

To return all three initials concatenated together, as was apparent
from the
OP's initial posting, would require a much longer conventional formula,
which
would be more difficult to adapt to the various possible naming
configurations.

That's one of the advantages of regular expressions.

--ron


Thanks Ron

I didn't read the initial post carefully enough, hence I'd already
edited my reply before your post, sorry :(

I posted a revised formula but of course if you have MOREFUNC I'm sure
the REGEX function would be superior


--
daddylonglegs
------------------------------------------------------------------------
daddylonglegs's Profile: http://www.excelforum.com/member.php...o&userid=30486
View this thread: http://www.excelforum.com/showthread...hreadid=505962



Reply
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
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
Ignoring Initial Articles in Field Sort DLFox Excel Discussion (Misc queries) 3 September 18th 05 09:35 PM
Stripping Middle Initial from a Name mira Excel Worksheet Functions 13 August 6th 05 08:46 PM
Extracting Last Name and First Initial Ruan New Users to Excel 4 December 17th 04 11:23 PM


All times are GMT +1. The time now is 11:07 PM.

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

About Us

"It's about Microsoft Excel"