#1   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 17
Default Substitute function

Can anyone help me to find out how to use substitute function? Here is my
example:

Description: BANKCARD DES:MERCH SETL ID:1xxxxxxxxxxx,INDN:ABC COMPANY
CO ID:1AAAAAAAAA CCD

I'd like to get rid of "DES:MERCH SETL" and "CO". Here is my formula
=TRIM(SUBSTITUTE(SUBSTITUE(B6,"DES:MERCH SETL","","CO",""))

Any susgessions? Thanks.


  #2   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 2,276
Default Substitute function

hi,

=TRIM(SUBSTITUTE(SUBSTITUTE(A1,"DES:MERCH SETL",""),"CO",""))

if this helps please click yes, thanks

"momotaro" wrote:

Can anyone help me to find out how to use substitute function? Here is my
example:

Description: BANKCARD DES:MERCH SETL ID:1xxxxxxxxxxx,INDN:ABC COMPANY
CO ID:1AAAAAAAAA CCD

I'd like to get rid of "DES:MERCH SETL" and "CO". Here is my formula
=TRIM(SUBSTITUTE(SUBSTITUE(B6,"DES:MERCH SETL","","CO",""))

Any susgessions? Thanks.


  #3   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 5,939
Default Substitute function

=TRIM(SUBSTITUTE(SUBSTITUTE(B6,"DES:MERCH SETL",""), "CO", ""))

You need to watch your brackets. Write one function and get it working and
then nest it in the next function...
--
HTH...

Jim Thomlinson


"momotaro" wrote:

Can anyone help me to find out how to use substitute function? Here is my
example:

Description: BANKCARD DES:MERCH SETL ID:1xxxxxxxxxxx,INDN:ABC COMPANY
CO ID:1AAAAAAAAA CCD

I'd like to get rid of "DES:MERCH SETL" and "CO". Here is my formula
=TRIM(SUBSTITUTE(SUBSTITUE(B6,"DES:MERCH SETL","","CO",""))

Any susgessions? Thanks.


  #4   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 15,768
Default Substitute function

I'd like to get rid of "DES:MERCH SETL" and "CO".
COMPANY CO


I assume you want to retain the "CO" in COMPANY.

Try this (all on one line):

=TRIM(SUBSTITUTE(SUBSTITUTE(A1
," DES:MERCH SETL ","")," CO ",""))


--
Biff
Microsoft Excel MVP


"momotaro" wrote in message
...
Can anyone help me to find out how to use substitute function? Here is my
example:

Description: BANKCARD DES:MERCH SETL ID:1xxxxxxxxxxx,INDN:ABC COMPANY
CO ID:1AAAAAAAAA CCD

I'd like to get rid of "DES:MERCH SETL" and "CO". Here is my formula
=TRIM(SUBSTITUTE(SUBSTITUE(B6,"DES:MERCH SETL","","CO",""))

Any susgessions? Thanks.




  #5   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 10
Default Substitute function

Does the text you want to remove appears in all records? Try using
Find/Replace but be careful in using it. Determine the unique text format so
that other texts may not be affected.

Sample:
FIND REPLACE
DES:MERCH SETL "leave blank"
_CO_ (_=space bar) "leave blank"


momotaro wrote:
Can anyone help me to find out how to use substitute function? Here is my
example:

Description: BANKCARD DES:MERCH SETL ID:1xxxxxxxxxxx,INDN:ABC COMPANY
CO ID:1AAAAAAAAA CCD

I'd like to get rid of "DES:MERCH SETL" and "CO". Here is my formula
=TRIM(SUBSTITUTE(SUBSTITUE(B6,"DES:MERCH SETL","","CO",""))

Any susgessions? Thanks.


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
'Substitute' function with wildcards [email protected] Excel Discussion (Misc queries) 1 July 22nd 09 05:42 PM
Substitute Function Question #2 Krista Excel Discussion (Misc queries) 5 April 13th 07 07:54 PM
SUBSTITUTE Function - Nesting Limitation D Bagatelle Excel Worksheet Functions 2 March 10th 07 02:25 PM
Substitute function [email protected] Excel Discussion (Misc queries) 1 January 29th 07 07:48 PM
Case function substitute Mariano Excel Discussion (Misc queries) 2 January 6th 06 04:15 PM


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