#1   Report Post  
rocket0612
 
Posts: n/a
Default Shorten A Name


If I have a cell A1 with a name entered in the format 'Mr A B SURNAME',
how can I get it shortened to just the start and end in B1 so it will
just show 'Mr SURNAME'.

thanks


--
rocket0612
------------------------------------------------------------------------
rocket0612's Profile: http://www.excelforum.com/member.php...o&userid=19492
View this thread: http://www.excelforum.com/showthread...hreadid=378932

  #2   Report Post  
mangesh_yadav
 
Posts: n/a
Default


Use:
=LEFT(A1,FIND(" ",A1)-1) & " " &
RIGHT(A1,LEN(A1)-MAX(ROW(INDIRECT("1:"&LEN(A1)))
*(MID(A1,ROW(INDIRECT("1:"&LEN(A1))),1)=" ")))

confirm with control shift enter as this is an array formula.

Source:
http://www.cpearson.com/excel/excelF.htm


Mangesh


--
mangesh_yadav
------------------------------------------------------------------------
mangesh_yadav's Profile: http://www.excelforum.com/member.php...o&userid=10470
View this thread: http://www.excelforum.com/showthread...hreadid=378932

  #3   Report Post  
rocket0612
 
Posts: n/a
Default


thanks Mangesh :)


--
rocket0612
------------------------------------------------------------------------
rocket0612's Profile: http://www.excelforum.com/member.php...o&userid=19492
View this thread: http://www.excelforum.com/showthread...hreadid=378932

  #4   Report Post  
olasa
 
Posts: n/a
Default


One option:
=LEFT(A1,FIND("
",A1)-1)&MID(A1,MAX((MID(A1,ROW(INDIRECT("1:"&LEN(A1))), 1)="
")*(ROW(INDIRECT("1:"&LEN(A1))))),255)
Confirm the formula by holding down Ctrl and Shift, and then hit
Enter.

Hope it helped
Ola Sandström


--
olasa
------------------------------------------------------------------------
olasa's Profile: http://www.excelforum.com/member.php...o&userid=17760
View this thread: http://www.excelforum.com/showthread...hreadid=378932

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
Auto Shorten a Data String Alan Excel Discussion (Misc queries) 1 May 11th 05 07:05 AM
formula too long, not sure how to shorten Jane Excel Worksheet Functions 16 January 11th 05 04:11 AM
Shorten sumproduct formula Andre Croteau Excel Discussion (Misc queries) 1 December 11th 04 10:30 PM


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

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"