1

I cannot seem to find a way on how to color 2 rows in a row. All tutorials are to color alternating rows.

Namely, this is the situation

A1:O1 Header Title
A2:02 Header Subtitle
A3:O3 Name
A4:O4 Value
A5:O5 Name
A6:O6 Value
A7:O7 Name
A8:O8 Value
...

Title rows are colored manually. I need to color rows 3 and 4 in 1 color, rows 5 and 6 in another color. Then again rows 7 and 8 in the first color. And so on.

Any ideas what custom formula in the conditional formatting should be?

I cannot use unique formula as nothing is unique here.

3

Yes, this is possible.

Apply Conditional Formatting to A3:[last column and row to which you want this applied].

Choose "Custom formula is" and enter the following formula:

=ISEVEN(ROUND(ROW()/2))

Set the background color and Save.

Then set up a second Conditional Formatting rule, applying to the same range. Again, choose "Custom formula is" and enter the following formula:

=ISODD(ROUND(ROW()/2))

Set the background color and Save.

HOW IT WORKS:

By dividing all row numbers in half and then ROUNDing them, you essentially pair them. For instance Row 3 divided in half is 1.5, which rounded up is 2; and Row 4 divided in half is 2, which rounded up is still 2.

Then the ISEVEN and ISODD alternate every other pair of rows.

| improve this answer | |

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.