Search code examples
google-sheetsgoogle-sheets-formula

Conditional formatting if a cell is a duplicate value


Here is what I've got and here is the outcome I want where I was initially using really long and unnecessarily complex formulas to do so using ad-hoc error-states that no longer work with the latest version of Google Sheets, but now am thinking, as per some guidance on a different question, that I really actually want conditional formatting similar to this.

What I want, however, is the text to become transparent when there's a duplicate, but only for the duplicates, not the original, so the first change in a column becomes visible, then if it's repeated down throughout the cells, it becomes transparent until there's a change in value.

I'm kind of stumped on this one, and although my logic is sound, I haven't used conditional formatting before, before I previously used formulas that returned a blank string if it were a duplicate, such as LOOKUP(2,1/(E:E<>"" as part of the formula, but Google Sheets returns a different kind of error state nowadays, so although this direct formula approach worked years ago, it no longer does.

So, how do I make the text transparent, but only for consecutive duplicates? (not just any duplicate in the column) - if you see here it sometimes blanks out values where it shouldn't.


Solution

  • Try this to apply conditional formatting to consecutive duplicates that are also not blanks.

    Select 'Apply to range' as B2:B

    =AND($B1=$B2,$B2<>"")