简体   繁体   中英

Is it possible to subtract the content of one cell from another in excel using formula?

Is it possible in excel using any formula to subtract (or whatever appropriate terms we can call it) from one cell to another so that the third cell will contain the rest of the portion. For example, If Range("A1") contains "I am not sure" and Range("B1") contains "not sure" and as a result the Range("C1") will have "I am" when subtraction is performed.

Original data are like:

ColumnA            ColumnB   
I am not sure      not sure
The sky is blue    is blue

Applying any excel formula, after subtracting Range("B") from Range("A") , The Range("C") will contain the rest of the portion like below:

ColumnA            ColumnB      ColumnC 
I am not sure      not sure     I am
The sky is blue    is blue      The sky

使用“ Substitute功能和“ Trim删除前导/后缀空格

=TRIM(SUBSTITUTE(A1,B1,""))

You could potentially do it this way: 在此处输入图片说明

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM