Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.worksheet.functions
RJW RJW is offline
external usenet poster
 
Posts: 1
Default advanced find and replace help

I want to replace sections between cells with a pipe symbol ' | ' but I cant
seem to get the function right. Because different data has different lengths
and characters, the find and replace function is too general. I eventually
want to merge the sections and place it in notepad when done.


e.g. I want to convert this:

AJE-1 NGA OML 113 AJE OML-1134 NIGERIA
N/A NGA OML 114 AJE OML-1113 NIGERIA

To this:

AJE-1|NGA|OML 113|AJE|OML-113|NIGERIA
N/A|NGA|OML 113|AJE|OML-113|NIGERIA

Any advice would be greatly appreciated.

Rich
  #2   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 2,480
Default advanced find and replace help

Hi

assuming the data is in column A, then in B1
=SUBSTITUTE(A1," ","|")
in C1
=SUBSTITUTE(B1,"OML|","OML ")
Copy down as far as required.

Column C will have your result. Copy column CPaste Special Values to "fix"
the data.
--
Regards
Roger Govier



"RJW" wrote in message
...
I want to replace sections between cells with a pipe symbol ' | ' but I
cant
seem to get the function right. Because different data has different
lengths
and characters, the find and replace function is too general. I eventually
want to merge the sections and place it in notepad when done.


e.g. I want to convert this:

AJE-1 NGA OML 113 AJE OML-1134 NIGERIA
N/A NGA OML 114 AJE OML-1113 NIGERIA

To this:

AJE-1|NGA|OML 113|AJE|OML-113|NIGERIA
N/A|NGA|OML 113|AJE|OML-113|NIGERIA

Any advice would be greatly appreciated.

Rich



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
Code to replace Advanced Filter RobN[_2_] Excel Discussion (Misc queries) 4 June 14th 07 12:31 PM
Advanced Find and replace [email protected] Links and Linking in Excel 0 February 23rd 07 07:29 AM
Advanced Find and Replace Question Ryan Excel Discussion (Misc queries) 3 August 6th 06 06:56 PM
Advanced Find and Replace Question Ryan Excel Worksheet Functions 1 August 5th 06 03:58 PM
find and replace - replace data in rows to separated by commas msdker Excel Worksheet Functions 1 April 15th 06 01:00 AM


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