1
votes

I simply want to use conditional formatting for highlight a row, but can't seem to get past blank cells incorrectly triggering my rule.

So I MAY have a numeric value in C7, and I will enter a numeric value in E7, but it will begin as a blank cell.

I want to very simply compare the value in those two cells. When E7 matches C7 I want my conditional formatting rule triggered. The issue is, this is an exported spreadsheet if about 1200 lines. If E7 and C7 are both blank (many are to start with), this triggers my compare rule undesirably. How do I ignore blank cells and my rule ONLY apply if there is a numeral?

Custom formula: =E7=C7

2

2 Answers

0
votes

Probably the shortest way is to use Countif:

=countif(E7,C7)

This will return a count of 1 if both cells are the same, but will ignore blank cells.

If you want the highlighting to apply across several cells, will need dollar signs to fix the columns to be tested:

=countif($E7,$C7)

enter image description here

0
votes

an alternative would be:

=AND($C1=$E1,C1<>"")

0