Forum Discussion

Hayley's avatar
Hayley
Copper Contributor
Feb 15, 2018

Conditionally formatting text

Hi experts,

I want to conditionally format the contents of the cells in one column based on it if mates the contents of the cell in the column next to it.

There is an order number in the first column, and I want to format the batch numbers in the second column on if they match the order number or not.

E.g. A3: 1732987 B3: 32987 I want to go green as it matches

A4: 1732654  B4: 132458 I want to go red as it doesn't match

All of the order numbers and batch numbers are different,

How would I go this please?

  • Hi Hayley,

     

    You may apply two rules to your column B, for the green

    =ISNUMBER(SEARCH($B3,$A3))

    and for the red

    =NOT(ISNUMBER(SEARCH($B3,$A3)))

    Just be careful with absolute and relative references.

    Attached.

     

    • Hayley's avatar
      Hayley
      Copper Contributor

      Thank-you Sergei, that's worked wonderfully