ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Discussion (Misc queries) (https://www.excelbanter.com/excel-discussion-misc-queries/)
-   -   FORMULAE - REPLACE (https://www.excelbanter.com/excel-discussion-misc-queries/178493-formulae-replace.html)

DarkStar

FORMULAE - REPLACE
 
How do I replace the first name with the first initial from a list of first
an d last names?

e.g.

John Doe with J Doe

Thank you,

Teethless mama

FORMULAE - REPLACE
 
=LEFT(A1)&" "&MID(A1,FIND(" ",A1)+1,99)


"DarkStar" wrote:

How do I replace the first name with the first initial from a list of first
an d last names?

e.g.

John Doe with J Doe

Thank you,


Rick Rothstein \(MVP - VB\)[_120_]

FORMULAE - REPLACE
 
Here is another way...

=SUBSTITUTE(A1,MID(A1,2,FIND(" ",A1)-2),"")

Rick


"DarkStar" wrote in message
...
How do I replace the first name with the first initial from a list of
first
an d last names?

e.g.

John Doe with J Doe

Thank you,



RagDyeR

FORMULAE - REPLACE
 
Try this:

=LEFT(A1)&MID(A1,FIND(" ",A1),50)
--
HTH,

RD

---------------------------------------------------------------------------
Please keep all correspondence within the NewsGroup, so all may benefit !
---------------------------------------------------------------------------

"DarkStar" wrote in message
...
How do I replace the first name with the first initial from a list of

first
an d last names?

e.g.

John Doe with J Doe

Thank you,



Ron Rosenfeld

FORMULAE - REPLACE
 
On Sun, 2 Mar 2008 14:34:01 -0800, DarkStar
wrote:

How do I replace the first name with the first initial from a list of first
an d last names?

e.g.

John Doe with J Doe

Thank you,



=REPLACE(A1,2,FIND(" ",A1)-2,"")

If it is possible that either the first or last name is not properly
capitalized, you could use this to also capitalize properly:

=PROPER(REPLACE(A1,2,FIND(" ",A1)-2,""))

--ron


All times are GMT +1. The time now is 12:23 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com