Search code examples
google-sheetsduplicatesformularepeatconditional-formatting

Google sheets, using conditional formatting to match consecutive duplicates


Does google sheets have a way of using conditional formatting to highlight duplicates, but only if they appear consecutively? For example, if I was to use the following spreadsheet:

            Column A
Row 1 | Apple
Row 2 | Tomato
Row 3 | Car
Row 4 | Car
Row 5 | Bus
Row 6 | Apple
Row 7 | Apple
Row 8 | Car

Is it possible to use a formula that would highlight rows 3 and 4, and 6 and 7?


Solution

  • Custom formula:

    =A1=A2
    

    Apply to

    A1:A100
    

    Or Formula:

    =OR(A2=A3,A2=A1)
    

    Apply to:

    A2:A110