• Hi All

    Please note that at the Chandoo.org Forums there is Zero Tolerance to Spam

    Post Spam and you Will Be Deleted as a User

    Hui...

  • When starting a new post, to receive a quicker and more targeted answer, Please include a sample file in the initial post.

Formatting rule for alternating color for row groups

mdavid

Member
Hi, I Need some help with formatting rules.
What I want to do is compare a cell value with the same cell in the previous row - the sheet is sorted on this column and I want the fill color to change when the value in this column changes. The Following doesn't work, I think it's changing the last line in the same group to the alternate color.

Rule
=IF($C3=$C2,TRUE,FALSE) Applies to =$B$2:$R$976
=IF($C3<>$C2,TRUE,FALSE) Applies to =$B$2:$R$976

Thanks for any help
David
 
Hi, I Need some help with formatting rules.
What I want to do is compare a cell value with the same cell in the previous row - the sheet is sorted on this column and I want the fill color to change when the value in this column changes. The Following doesn't work, I think it's changing the last line in the same group to the alternate color.

Rule
=IF($C3=$C2,TRUE,FALSE) Applies to =$B$2:$R$976
=IF($C3<>$C2,TRUE,FALSE) Applies to =$B$2:$R$976

Thanks for any help
David
If you're comparing with the previous row, the formulas should be =C2=C1 and =C2<>C1
 
I would recommend a hidden helper column to get meaningful banding that changes colour with the species name. For example
=IF($C2=$C1,$V1,1-$V1)
will alternate between 0 and 1 as the name changes.
 
Back
Top