Background color of alternating lines in pairs of three

ruiviagem

New Member
Joined
Apr 18, 2021
Messages
8
Office Version
  1. 2019
Platform
  1. Windows
Hello everyone, I need your help.
needed to alternately color the visible lines from three to three,
because when I apply a filter or hide the lines everything is unformatted.
I used the formula this formula (= MOD (ROW () - 5; 6)> = 3)
in conditional formatting ...
(
HELP.png
I'm a bit of a frog in excel :)))))
Thanks!
 

Excel Facts

How can you turn a range sideways?
Copy the range. Select a blank cell. Right-click, Paste Special, then choose Transpose.
Try
Excel Formula:
=MOD(SUBTOTAL(103;$C$5:$C5)-1;6)>2
Note that I've used column C as a reference, the range in the formula must use a column that will have data in every row (no merged rows).
Note also that there are 3 $ symbols in the formula, it they are incorrectly placed then it is likely to fail.
 
Upvote 0
Solution
Try
Excel Formula:
=MOD(SUBTOTAL(103;$C$5:$C5)-1;6)>2
Note that I've used column C as a reference, the range in the formula must use a column that will have data in every row (no merged rows).
Note also that there are 3 $ symbols in the formula, it they are incorrectly placed then it is likely to fail.
Works perfectly : )
Thank you very much!!!
 
Upvote 0

Forum statistics

Threads
1,215,043
Messages
6,122,822
Members
449,096
Latest member
Erald

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top