Coloring alternating table rows
Adding color to alternating rows in a table is a great way to improve a page’s readability and visual clarity. By applying different background colors to every other row, it becomes easier for the reader to distinguish between rows and follow the data across the table. This visual pattern helps reduce eye strain and makes it easier to scan and compare information. Also, it looks good! There are two different forms of the conditional formatting needed to get the alternating colors, depending on whether or not you’ve applied sorting to your table.
For tables without sorting:
If you want to add color to every other row (with the alternating row having no color), you’ll need to add one conditional formatting rule:- If you want the first row to have color, follow “Condition 2: Odd rows”
- If you want the second row to have color, follow “Condition 1: Even rows”
Condition 1: Even rows
Find(thisRow, [YOUR TABLE]).IsEven()
Condition 2: Odd rows
Find(thisRow, [YOUR TABLE]).IsOdd()
For tables with sorting:
If you want to add color to every other row (with the alternating row having no color), you’ll need to add one conditional formatting rule:- If you want the first row to have color, follow “Condition 2: Odd rows”
- If you want the second row to have color, follow “Condition 1: Even rows”
Condition 1: Even rows
Find( thisRow, [YOUR TABLE] .Sort(...)) .IsEven()
Condition 2: Odd rows
Find( thisRow, [YOUR TABLE] .Sort(...)) .IsOdd()
Coda tip
The conditional formatting rule will not automatically update if you change the sort on your table. If you do change how the table is sorted in the future, you will also need to update the conditional formatting formulas to match.
Was this helpful?
YesNo