Custom Formula Alternative Color Based on Uniques

66 views Asked by At

Column B is name. How to alternate color based on unique names meaning same name rows get grey background color (entire row) next unique name rows is white and so on

23:06 21/07/20  Rocio seijas    40
23:14 21/07/20  Paola Valeria Gómez     36
23:14 21/07/20  Paola Valeria Gómez     36
23:14 21/07/20  Paola Valeria Gómez     36
23:14 21/07/20  Mariquena Fuentes   39
23:15 21/07/20  Irupé Ramirez Mendez    38
23:15 21/07/20  Cecilia Ferreyro    36
23:16 21/07/20  Teresa Mabel Ceccarelli 40
23:16 21/07/20  Teresa Mabel Ceccarelli 40
23:17 21/07/20  Liliana ramon   36
23:17 21/07/20  Carlos Argentino Riera  40
23:17 21/07/20  María Belén Llapur  37
23:18 21/07/20  Maria Laura Villalba    39
23:18 21/07/20  Maria Laura Villalba    39
23:20 21/07/20  Verónica Ogas.  39
23:20 21/07/20  Verónica Ogas.  39
23:23 21/07/20  ZAFFI DANIELA   35
23:23 21/07/20  ZAFFI DANIELA   35
23:23 21/07/20  ZAFFI DANIELA   35
23:24 21/07/20  Melisa Ferrer   36
23:24 21/07/20  Melisa Ferrer   36
23:25 21/07/20  Claudia González    39
23:25 21/07/20  Claudia González    39
23:25 21/07/20  Claudia González    39
23:26 21/07/20  Eliana Noel Vazquez 39
1

There are 1 answers

0
ADW On BEST ANSWER

If you don't mind using a helper column, here is one way:

  • Column B has the names (unique values that determine row colour)

  • Column D is the helper column.

  • D1 value: TRUE

  • D2 formula: =if(B2=B1,D1,not(D1)) (and then this formula all the way down)

Apply conditional formatting:

  • to range: A1:D1000
  • custom formula is: =$D1=TRUE

Example Google Sheet here. Make a copy to see the conditional formatting rule.

Screenshot below:

enter image description here