For example:
Cell A1 has:
Peter is walking his dog
Cell B1 has:
walking his dog
preferably how can I remove the "walking his dog" from cell A1
or to create a new cell which contains "Peter is"
For example:
Cell A1 has:
Peter is walking his dog
Cell B1 has:
walking his dog
preferably how can I remove the "walking his dog" from cell A1
or to create a new cell which contains "Peter is"
Try this
in C1
Formula:
=SUBSTITUTE(A1,B1,"")
v A B C 1 Peter is walking his dog walking his dog Peter is
If you like my answer please click on * Add Reputation
Don't forget to mark threads as "Solved" if your problem has been resolved
"Nothing is so firmly believed as what we least know."
--Michel de Montaigne
Hi,
You can do this:
Excel 2016 (Windows) 64 bit
A B C 1Peter is walking his dog walking his dog Peter is 2Paul is feeding his cat playing with his cat 3Paul is playing with his cat Paul is playing with his cat
Sheet: Sheet41
Excel 2016 (Windows) 64 bit
C 1=IF(ISNUMBER(SEARCH(B1,A1)),TRIM(SUBSTITUTE(A1,B1,"")),"")
Sheet: Sheet41
Formula copied down.
Same question asked here: https://www.excelforum.com/excel-for...ntains-it.html
Please do not post duplicate threads. Your other thread has been closed so you can continue here
Thanks![]()
1. Use code tags for VBA. [code] Your Code [/code] (or use the # button)
2. If your question is resolved, mark it SOLVED using the thread tools
3. Click on the star if you think someone helped you
Regards
Ford
There are currently 1 users browsing this thread. (0 members and 1 guests)
Bookmarks