ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   New Users to Excel (https://www.excelbanter.com/new-users-excel/)
-   -   leave only first letter of last name (https://www.excelbanter.com/new-users-excel/24863-leave-only-first-letter-last-name.html)

[email protected]

leave only first letter of last name
 
I tried to search for this solution on the web, but finally gave up.

Here's what I want to do

In a cell I have a users First and Lastname (yes both in the same
cell).
I'd like to end up with Firstname and first letter of Lastname (don't
have to still be in a single cell, but would be nice).

So go from: Ima User to Ima U

Thanks for your help


Max

Assuming data is in A1 down,
Try in B1: =LEFT(A1,LEN(TRIM(A1))-SEARCH(" ",TRIM(A1))+1)
Copy down
--
Rgds
Max
xl 97
---
GMT+8, 1° 22' N 103° 45' E
xdemechanik <atyahoo<dotcom
----
wrote in message
oups.com...
I tried to search for this solution on the web, but finally gave up.

Here's what I want to do

In a cell I have a users First and Lastname (yes both in the same
cell).
I'd like to end up with Firstname and first letter of Lastname (don't
have to still be in a single cell, but would be nice).

So go from: Ima User to Ima U

Thanks for your help




[email protected]

That worked on maybe 25% of the names I have.


Max

Maybe you could post/paste some sample data (to cover as full a range of the
different variations as possible), and the expected results.
I'm sure you'll get much better suggestions ..
--
Rgds
Max
xl 97
---
GMT+8, 1° 22' N 103° 45' E
xdemechanik <atyahoo<dotcom
----
wrote in message
oups.com...
That worked on maybe 25% of the names I have.




Max

In the interim, guess you could also try this:

=LEFT(TRIM(A1),SEARCH(" ",TRIM(A1))-1)&" "&MID(TRIM(A1),SEARCH("
",TRIM(A1))+1,1)

Let me know how many percent is achieved with the above <g

--
Rgds
Max
xl 97
---
GMT+8, 1° 22' N 103° 45' E
xdemechanik <atyahoo<dotcom
----
wrote in message
oups.com...
That worked on maybe 25% of the names I have.




Max

Trash the earlier convolution, sorry

Just try in B1: =LEFT(TRIM(A1),SEARCH(" ",TRIM(A1))+1)
--
Rgds
Max
xl 97
---
GMT+8, 1° 22' N 103° 45' E
xdemechanik <atyahoo<dotcom
----



[email protected]

SWEET! That's 100%! Thanks Max ... you rock!


Max

Glad to hear that it worked!
Thanks for the feedback ..
--
Rgds
Max
xl 97
---
GMT+8, 1° 22' N 103° 45' E
xdemechanik <atyahoo<dotcom
----
wrote in message
oups.com...
SWEET! That's 100%! Thanks Max ... you rock!





All times are GMT +1. The time now is 03:40 PM.

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