Excel - How to remove part of text using conditional formatting?

Anonymous
2024-04-17T09:00:20+00:00

Hello,

I wanted to remove a part of text from a cell that is in another cell.

But I don't know how to write it in the conditional formatting exactly (I still have a problem with using dollars)

Please help

Thank you

Microsoft 365 and Office | Excel | For business | Windows

Locked Question. This question was migrated from the Microsoft Support Community. You can vote on whether it's helpful, but you can't add comments or replies or follow the question.

0 comments No comments
{count} votes
Answer accepted by question author
  1. Anonymous
    2024-04-17T09:36:57+00:00

    You should use formula in Cells instead of conditional formatting.

    =SUBSTITUTE(C2,B2,"")

    Or

    =TEXTJOIN("+",,TEXTSPLIT(SUBSTITUTE(C2,B2,""),"+"))

    1 person found this answer helpful.
    0 comments No comments
Answer accepted by question author
  1. HansV 462.4K Reputation points MVP Volunteer Moderator
    2024-04-17T09:34:14+00:00

    You cannot use conditional formatting to change the value of a cell, only to change the way it is displayed.

    You can use a formula in another cell. For example in D2:

    =SUBSTITUTE(C2, B2, "")

    Fill down.

    Please note that this will return DOG++FISH in D2, and +CAT+FISH in D3.

    To get around this:

    =MID(SUBSTITUTE("+"&C2, "+"&B2, ""), 2, 100)

    1 person found this answer helpful.
    0 comments No comments

0 additional answers

Sort by: Most helpful