Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 318
Default delete middle word from a cell

Good morning
I have a large spreadsheet. The entry in one columns has a name e.g. Mr.
John Smith. what I need is to delete the middle name so that it reads Mr.
Smith I tried the functions LEFT , RIGHT, and text to columns. what is the
right way to do this or do I need a macro?
  #2   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 3,355
Default delete middle word from a cell

Let's say you have Mr. John Smith in cell A1:

It's ugly, but it works

=LEFT(A1,SEARCH(" ",A1)-1)&" "&RIGHT(RIGHT(A1,LEN(A1)-SEARCH("
",A1)),LEN(RIGHT(A1,LEN(A1)-SEARCH(" ",A1)))-SEARCH("
",RIGHT(A1,LEN(A1)-SEARCH(" ",A1))))



"Wanna Learn" wrote:

Good morning
I have a large spreadsheet. The entry in one columns has a name e.g. Mr.
John Smith. what I need is to delete the middle name so that it reads Mr.
Smith I tried the functions LEFT , RIGHT, and text to columns. what is the
right way to do this or do I need a macro?

  #3   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 340
Default delete middle word from a cell

Try Edit Replace with Find: ' * ' and Replace: ' '
[Explicitly: Find: single space followed by * followed by single space;
Replace: single space]

Wanna Learn wrote:

Good morning
I have a large spreadsheet. The entry in one columns has a name e.g. Mr.
John Smith. what I need is to delete the middle name so that it reads Mr.
Smith I tried the functions LEFT , RIGHT, and text to columns. what is the
right way to do this or do I need a macro?


  #4   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 318
Default delete middle word from a cell

Lori

PERFECT! thanks have agreat day

"Lori" wrote:

Try Edit Replace with Find: ' * ' and Replace: ' '
[Explicitly: Find: single space followed by * followed by single space;
Replace: single space]

Wanna Learn wrote:

Good morning
I have a large spreadsheet. The entry in one columns has a name e.g. Mr.
John Smith. what I need is to delete the middle name so that it reads Mr.
Smith I tried the functions LEFT , RIGHT, and text to columns. what is the
right way to do this or do I need a macro?



  #5   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 29
Default delete middle word from a cell

wow, that was brilliant!
:)


"Lori" escreveu na mensagem
ups.com...
Try Edit Replace with Find: ' * ' and Replace: ' '
[Explicitly: Find: single space followed by * followed by single space;
Replace: single space]

Wanna Learn wrote:

Good morning
I have a large spreadsheet. The entry in one columns has a name e.g.
Mr.
John Smith. what I need is to delete the middle name so that it reads
Mr.
Smith I tried the functions LEFT , RIGHT, and text to columns. what is
the
right way to do this or do I need a macro?






  #6   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 340
Default delete middle word from a cell

Thanks - you too..

Wanna Learn wrote:

Lori

PERFECT! thanks have agreat day

"Lori" wrote:

Try Edit Replace with Find: ' * ' and Replace: ' '
[Explicitly: Find: single space followed by * followed by single space;
Replace: single space]

Wanna Learn wrote:

Good morning
I have a large spreadsheet. The entry in one columns has a name e.g. Mr.
John Smith. what I need is to delete the middle name so that it reads Mr.
Smith I tried the functions LEFT , RIGHT, and text to columns. what is the
right way to do this or do I need a macro?




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
Copy text from word with returns into one cell Carolyn Excel Discussion (Misc queries) 8 September 4th 06 11:16 PM
copy excel cell to cell in word table using excel macro jthurnwps Excel Discussion (Misc queries) 0 July 21st 06 07:11 PM
Delete all contents of cell but one word Hayette Hasham Excel Discussion (Misc queries) 5 January 18th 06 08:20 AM
How can I use find and replace to delete a word in Excel? callpaultwt Excel Discussion (Misc queries) 2 December 1st 05 09:11 PM
Possible Lookup Table Karen Excel Worksheet Functions 5 June 8th 05 09:43 PM


All times are GMT +1. The time now is 09:51 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"