I have an excel spreadsheet containing two columns. I use the EXACT function to determine if, for example if A2.equals(B2). The function returns true/false in another cell.

However, I am looking to highlight the original cell that matches/do not match. In this case if A2.equals(B2) evaluates to false, the cells being checked, A2 and B2, are highlighted, how would I go about doing this?

  • Just use conditional formatting in the cells you want to format, and use the rules there you want. The fact that something is doing another comparison in another cell doesn't affect that.
    – fixer1234
    Jan 4 '19 at 8:44

As mentioned already, you need to use conditional formatting:

  • select the range where you want to highlight the values (columns A & B in your example)
  • go to home - conditional formatting - new rule
  • select "use a formula to determine which cells to format
  • enter formula:
    note: row number need to be the row number of the active cell A2 in the example, you can check it in the address bar
  • click format and set your desired highlight style
  • press ok

enter image description here

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.