#1   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 1
Default Subtracting text

Can anyone offer help subtracting the contents of 1 cell's text from another?
This is basically a reverse =CONCATENATE() question.

Ex: Cell A1 = ABCDEFG
Cell B1 = FG
formula results desired for A1-B1 = ABCDE
  #2   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 2,059
Default Subtracting text


"idrabefi" wrote:
Can anyone offer help subtracting the contents of 1 cell's text from
another?
This is basically a reverse =CONCATENATE() question.
Ex: Cell A1 = ABCDEFG
Cell B1 = FG
formula results desired for A1-B1 = ABCDE


=left(A1,len(A1)-len(B1))

  #3   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 11,058
Default Subtracting text

=SUBSTITUTE(A1,B1,"")

--
Gary''s Student - gsnu200857
  #4   Report Post  
Posted to microsoft.public.excel.misc
Max Max is offline
external usenet poster
 
Posts: 9,221
Default Subtracting text

Try in C1: =SUBSTITUTE(A1,B1,"")
voila? celebrato, click YES below
--
Max
Singapore
http://savefile.com/projects/236895
Downloads:25,000 Files:300 Subscribers:70
xdemechanik
---
"idrabefi" wrote:
Can anyone offer help subtracting the contents of 1 cell's text from another?
This is basically a reverse =CONCATENATE() question.

Ex: Cell A1 = ABCDEFG
Cell B1 = FG
formula results desired for A1-B1 = ABCDE

  #5   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 2,059
Default Subtracting text

"Max" wrote:
Try in C1: =SUBSTITUTE(A1,B1,"")


Test with "time to time" in A1 and "time" in B1.


----- original message -----

"Max" wrote in message
...
Try in C1: =SUBSTITUTE(A1,B1,"")
voila? celebrato, click YES below
--
Max
Singapore
http://savefile.com/projects/236895
Downloads:25,000 Files:300 Subscribers:70
xdemechanik
---
"idrabefi" wrote:
Can anyone offer help subtracting the contents of 1 cell's text from
another?
This is basically a reverse =CONCATENATE() question.

Ex: Cell A1 = ABCDEFG
Cell B1 = FG
formula results desired for A1-B1 = ABCDE




  #6   Report Post  
Posted to microsoft.public.excel.misc
Max Max is offline
external usenet poster
 
Posts: 9,221
Default Subtracting text

"JoeU2004" wrote:
Test with "time to time" in A1 and "time" in B1

That's a new question? What was offered earlier does
give the desired results as indicated by the OP.
--
Max
Singapore
http://savefile.com/projects/236895
Downloads:25,000 Files:300 Subscribers:70
xdemechanik
---
  #7   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 3,346
Default Subtracting text

Hi,

You have some solutions but the problem is your question in not clear. Are
you trying to "subtract" FG because it is at the end to of the string in A1
or are you trying to remove it wherever it is?

The SUBSTITUTE approach removes all occurances of it:

=SUBSTITUTE(A1,A2,)

If you want to remove the characters on the right and you know they will be
what is in FG then you use the other approach shown. If you want to remove
the right-hand characters IF they match A2 then

=IF(RIGHT(A1,LEN(A2))=A2,LEFT(A1,LEN(A1)-LEN(A2)),"")

--
If this helps, please click the Yes button.

Cheers,
Shane Devenshire


"idrabefi" wrote:

Can anyone offer help subtracting the contents of 1 cell's text from another?
This is basically a reverse =CONCATENATE() question.

Ex: Cell A1 = ABCDEFG
Cell B1 = FG
formula results desired for A1-B1 = ABCDE

  #8   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 5,934
Default Subtracting text

The OP needs to clarify one other thing... is FG supposed to be considered a
single "word" to be deleted? Or does he want all F's and all G's removed
whether they appear next to each other or not?

--
Rick (MVP - Excel)


"Shane Devenshire" wrote in
message ...
Hi,

You have some solutions but the problem is your question in not clear.
Are
you trying to "subtract" FG because it is at the end to of the string in
A1
or are you trying to remove it wherever it is?

The SUBSTITUTE approach removes all occurances of it:

=SUBSTITUTE(A1,A2,)

If you want to remove the characters on the right and you know they will
be
what is in FG then you use the other approach shown. If you want to
remove
the right-hand characters IF they match A2 then

=IF(RIGHT(A1,LEN(A2))=A2,LEFT(A1,LEN(A1)-LEN(A2)),"")

--
If this helps, please click the Yes button.

Cheers,
Shane Devenshire


"idrabefi" wrote:

Can anyone offer help subtracting the contents of 1 cell's text from
another?
This is basically a reverse =CONCATENATE() question.

Ex: Cell A1 = ABCDEFG
Cell B1 = FG
formula results desired for A1-B1 = ABCDE


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
Subtracting Text from Number [email protected] Excel Discussion (Misc queries) 6 June 1st 07 10:45 PM
Subtracting Text from Number [email protected] Excel Worksheet Functions 4 June 1st 07 07:02 PM
trouble with subtracting cells and adding text... traybuddy Excel Discussion (Misc queries) 5 October 14th 05 01:20 PM
trouble with subtracting cells and adding text... Gary''s Student Excel Discussion (Misc queries) 0 October 14th 05 05:18 AM
Defining a number in a cell by text then subtracting it by the tex Crowraine Excel Worksheet Functions 1 December 16th 04 07:49 AM


All times are GMT +1. The time now is 12:43 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"