Hiya! sorry if i'm not supposed to do this, I'm new. this seems very close to what i am trying to do, but I can't get any of these solutions to work for me and i was hoping that someone would know how to do this without VBA.
I want to alternate row colors at each change in the value of a specified column in a list of numbers sorted ascending, kinda like the using the "subtotal" tool, but instead of summing at each change in [column name] i want to change the row color. i want it to say "fill the rows with color#1 until the value changes then switch to color#2, then at the next value change switch back to color#1, and so on through the end of the data. i found a solution that nearly works, but it doesn't alternate the colors when there are two groups of odd or even numbers occurring consecutively or something... this solution is a conditional format using two rules formatting for different colors, one of the following formulas for each rule:
=EVEN(VALUE(RIGHT($B1,LEN($B1)-1)))=VALUE(RIGHT($B1,LEN($B1)-1))
=NOT(EVEN(VALUE(RIGHT($B1,LEN($B1)-1)))=VALUE(RIGHT($B1,LEN($B1)-1)))
here's a short example of what i get using this solution - notice where the number changes but the colors stay the same. that is the problem, the need to alternate at every change reliably. I wish i had bookmarked that posting so I could ask the amazing person who came up with these giant formulas what they would do. live and learn i guess
<TABLE style="WIDTH: 56pt; BORDER-COLLAPSE: collapse" cellSpacing=0 cellPadding=0 width=74 border=0><COLGROUP><COL style="WIDTH: 56pt" width=74><TBODY><TR style="HEIGHT: 15pt" height=20><TD class=xl71 style="BORDER-RIGHT: windowtext 0.5pt solid; BORDER-TOP: windowtext 0.5pt solid; FONT-WEIGHT: 400; FONT-SIZE: 10pt; BACKGROUND: rgb(184,204,228); BORDER-LEFT: windowtext 0.5pt solid; WIDTH: 56pt; COLOR: black; BORDER-BOTTOM: windowtext 0.5pt solid; FONT-FAMILY: Arial; HEIGHT: 15pt; TEXT-DECORATION: none; -moz-background-clip: border; -moz-background-origin: padding; -moz-background-inline-policy: continuous" width=74 height=20>300090</TD></TR><TR style="HEIGHT: 15pt" height=20><TD class=xl71 style="BORDER-RIGHT: windowtext 0.5pt solid; BORDER-TOP: windowtext 0.5pt solid; FONT-WEIGHT: 400; FONT-SIZE: 10pt; BACKGROUND: rgb(194,214,154); BORDER-LEFT: windowtext 0.5pt solid; COLOR: black; BORDER-BOTTOM: windowtext 0.5pt solid; FONT-FAMILY: Arial; HEIGHT: 15pt; TEXT-DECORATION: none; -moz-background-clip: border; -moz-background-origin: padding; -moz-background-inline-policy: continuous" height=20>300091</TD></TR><TR style="HEIGHT: 15pt" height=20><TD class=xl71 style="BORDER-RIGHT: windowtext 0.5pt solid; BORDER-TOP: windowtext 0.5pt solid; FONT-WEIGHT: 400; FONT-SIZE: 10pt; BACKGROUND: rgb(184,204,228); BORDER-LEFT: windowtext 0.5pt solid; COLOR: black; BORDER-BOTTOM: windowtext 0.5pt solid; FONT-FAMILY: Arial; HEIGHT: 15pt; TEXT-DECORATION: none; -moz-background-clip: border; -moz-background-origin: padding; -moz-background-inline-policy: continuous" height=20>300092</TD></TR><TR style="HEIGHT: 15pt" height=20><TD class=xl71 style="BORDER-RIGHT: windowtext 0.5pt solid; BORDER-TOP: windowtext 0.5pt solid; FONT-WEIGHT: 400; FONT-SIZE: 10pt; BACKGROUND: rgb(194,214,154); BORDER-LEFT: windowtext 0.5pt solid; COLOR: black; BORDER-BOTTOM: windowtext 0.5pt solid; FONT-FAMILY: Arial; HEIGHT: 15pt; TEXT-DECORATION: none; -moz-background-clip: border; -moz-background-origin: padding; -moz-background-inline-policy: continuous" height=20>300093</TD></TR><TR style="HEIGHT: 15pt" height=20><TD class=xl71 style="BORDER-RIGHT: windowtext 0.5pt solid; BORDER-TOP: windowtext 0.5pt solid; FONT-WEIGHT: 400; FONT-SIZE: 10pt; BACKGROUND: rgb(184,204,228); BORDER-LEFT: windowtext 0.5pt solid; COLOR: black; BORDER-BOTTOM: windowtext 0.5pt solid; FONT-FAMILY: Arial; HEIGHT: 15pt; TEXT-DECORATION: none; -moz-background-clip: border; -moz-background-origin: padding; -moz-background-inline-policy: continuous" height=20>300094</TD></TR><TR style="HEIGHT: 15pt" height=20><TD class=xl73 style="BORDER-RIGHT: windowtext 0.5pt solid; BORDER-TOP: windowtext 0.5pt solid; FONT-WEIGHT: 400; FONT-SIZE: 10pt; BACKGROUND: rgb(194,214,154); BORDER-LEFT: windowtext 0.5pt solid; COLOR: windowtext; BORDER-BOTTOM: windowtext 0.5pt solid; FONT-FAMILY: Calibri; HEIGHT: 15pt; TEXT-DECORATION: none; -moz-background-clip: border; -moz-background-origin: padding; -moz-background-inline-policy: continuous" height=20>300103</TD></TR><TR style="HEIGHT: 15pt" height=20><TD class=xl72 style="BORDER-RIGHT: windowtext 0.5pt solid; BORDER-TOP: windowtext 0.5pt solid; FONT-WEIGHT: 400; FONT-SIZE: 10pt; BACKGROUND: rgb(194,214,154); BORDER-LEFT: windowtext 0.5pt solid; COLOR: black; BORDER-BOTTOM: windowtext 0.5pt solid; FONT-FAMILY: Arial; HEIGHT: 15pt; TEXT-DECORATION: none; -moz-background-clip: border; -moz-background-origin: padding; -moz-background-inline-policy: continuous" height=20>300103</TD></TR><TR style="HEIGHT: 15pt" height=20><TD class=xl72 style="BORDER-RIGHT: windowtext 0.5pt solid; BORDER-TOP: windowtext 0.5pt solid; FONT-WEIGHT: 400; FONT-SIZE: 10pt; BACKGROUND: rgb(194,214,154); BORDER-LEFT: windowtext 0.5pt solid; COLOR: black; BORDER-BOTTOM: windowtext 0.5pt solid; FONT-FAMILY: Arial; HEIGHT: 15pt; TEXT-DECORATION: none; -moz-background-clip: border; -moz-background-origin: padding; -moz-background-inline-policy: continuous" height=20>300103</TD></TR><TR style="HEIGHT: 15pt" height=20><TD class=xl73 style="BORDER-RIGHT: windowtext 0.5pt solid; BORDER-TOP: windowtext 0.5pt solid; FONT-WEIGHT: 400; FONT-SIZE: 10pt; BACKGROUND: rgb(184,204,228); BORDER-LEFT: windowtext 0.5pt solid; COLOR: windowtext; BORDER-BOTTOM: windowtext 0.5pt solid; FONT-FAMILY: Calibri; HEIGHT: 15pt; TEXT-DECORATION: none; -moz-background-clip: border; -moz-background-origin: padding; -moz-background-inline-policy: continuous" height=20>300104</TD></TR><TR style="HEIGHT: 15pt" height=20><TD class=xl74 style="BORDER-RIGHT: windowtext 0.5pt solid; BORDER-TOP: windowtext 0.5pt solid; FONT-WEIGHT: 400; FONT-SIZE: 10pt; BACKGROUND: rgb(184,204,228); BORDER-LEFT: windowtext 0.5pt solid; COLOR: windowtext; BORDER-BOTTOM: windowtext 0.5pt solid; FONT-FAMILY: Arial; HEIGHT: 15pt; TEXT-DECORATION: none; -moz-background-clip: border; -moz-background-origin: padding; -moz-background-inline-policy: continuous" height=20>300104</TD></TR><TR style="HEIGHT: 15pt" height=20><TD class=xl74 style="BORDER-RIGHT: windowtext 0.5pt solid; BORDER-TOP: windowtext 0.5pt solid; FONT-WEIGHT: 400; FONT-SIZE: 10pt; BACKGROUND: rgb(184,204,228); BORDER-LEFT: windowtext 0.5pt solid; COLOR: windowtext; BORDER-BOTTOM: windowtext 0.5pt solid; FONT-FAMILY: Arial; HEIGHT: 15pt; TEXT-DECORATION: none; -moz-background-clip: border; -moz-background-origin: padding; -moz-background-inline-policy: continuous" height=20>300104</TD></TR><TR style="HEIGHT: 15pt" height=20><TD class=xl73 style="BORDER-RIGHT: windowtext 0.5pt solid; BORDER-TOP: windowtext 0.5pt solid; FONT-WEIGHT: 400; FONT-SIZE: 10pt; BACKGROUND: rgb(194,214,154); BORDER-LEFT: windowtext 0.5pt solid; COLOR: windowtext; BORDER-BOTTOM: windowtext 0.5pt solid; FONT-FAMILY: Calibri; HEIGHT: 15pt; TEXT-DECORATION: none; -moz-background-clip: border; -moz-background-origin: padding; -moz-background-inline-policy: continuous" height=20>300105</TD></TR><TR style="HEIGHT: 15pt" height=20><TD class=xl71 style="BORDER-RIGHT: windowtext 0.5pt solid; BORDER-TOP: windowtext 0.5pt solid; FONT-WEIGHT: 400; FONT-SIZE: 10pt; BACKGROUND: rgb(194,214,154); BORDER-LEFT: windowtext 0.5pt solid; COLOR: black; BORDER-BOTTOM: windowtext 0.5pt solid; FONT-FAMILY: Arial; HEIGHT: 15pt; TEXT-DECORATION: none; -moz-background-clip: border; -moz-background-origin: padding; -moz-background-inline-policy: continuous" height=20>300105</TD></TR><TR style="HEIGHT: 15pt" height=20><TD class=xl72 style="BORDER-RIGHT: windowtext 0.5pt solid; BORDER-TOP: windowtext 0.5pt solid; FONT-WEIGHT: 400; FONT-SIZE: 10pt; BACKGROUND: rgb(194,214,154); BORDER-LEFT: windowtext 0.5pt solid; COLOR: black; BORDER-BOTTOM: windowtext 0.5pt solid; FONT-FAMILY: Arial; HEIGHT: 15pt; TEXT-DECORATION: none; -moz-background-clip: border; -moz-background-origin: padding; -moz-background-inline-policy: continuous" height=20>300105</TD></TR><TR style="HEIGHT: 15pt" height=20><TD class=xl71 style="BORDER-RIGHT: windowtext 0.5pt solid; BORDER-TOP: windowtext 0.5pt solid; FONT-WEIGHT: 400; FONT-SIZE: 10pt; BACKGROUND: rgb(184,204,228); BORDER-LEFT: windowtext 0.5pt solid; COLOR: black; BORDER-BOTTOM: windowtext 0.5pt solid; FONT-FAMILY: Arial; HEIGHT: 15pt; TEXT-DECORATION: none; -moz-background-clip: border; -moz-background-origin: padding; -moz-background-inline-policy: continuous" height=20>300106</TD></TR><TR style="HEIGHT: 15pt" height=20><TD class=xl75 style="BORDER-RIGHT: windowtext 0.5pt solid; BORDER-TOP: windowtext 0.5pt solid; FONT-WEIGHT: 700; FONT-SIZE: 10pt; BACKGROUND: rgb(184,204,228); BORDER-LEFT: windowtext 0.5pt solid; COLOR: black; BORDER-BOTTOM: windowtext 0.5pt solid; FONT-FAMILY: Arial; HEIGHT: 15pt; TEXT-DECORATION: none; -moz-background-clip: border; -moz-background-origin: padding; -moz-background-inline-policy: continuous" height=20>300106</TD></TR><TR style="HEIGHT: 15pt" height=20><TD class=xl75 style="BORDER-RIGHT: windowtext 0.5pt solid; BORDER-TOP: windowtext 0.5pt solid; FONT-WEIGHT: 700; FONT-SIZE: 10pt; BACKGROUND: rgb(184,204,228); BORDER-LEFT: windowtext 0.5pt solid; COLOR: black; BORDER-BOTTOM: windowtext 0.5pt solid; FONT-FAMILY: Arial; HEIGHT: 15pt; TEXT-DECORATION: none; -moz-background-clip: border; -moz-background-origin: padding; -moz-background-inline-policy: continuous" height=20>300106</TD></TR><TR style="HEIGHT: 15pt" height=20><TD class=xl71 style="BORDER-RIGHT: windowtext 0.5pt solid; BORDER-TOP: windowtext 0.5pt solid; FONT-WEIGHT: 400; FONT-SIZE: 10pt; BACKGROUND: rgb(184,204,228); BORDER-LEFT: windowtext 0.5pt solid; COLOR: black; BORDER-BOTTOM: windowtext 0.5pt solid; FONT-FAMILY: Arial; HEIGHT: 15pt; TEXT-DECORATION: none; -moz-background-clip: border; -moz-background-origin: padding; -moz-background-inline-policy: continuous" height=20>300108</TD></TR><TR style="HEIGHT: 15pt" height=20><TD class=xl72 style="BORDER-RIGHT: windowtext 0.5pt solid; BORDER-TOP: windowtext 0.5pt solid; FONT-WEIGHT: 400; FONT-SIZE: 10pt; BACKGROUND: rgb(184,204,228); BORDER-LEFT: windowtext 0.5pt solid; COLOR: black; BORDER-BOTTOM: windowtext 0.5pt solid; FONT-FAMILY: Arial; HEIGHT: 15pt; TEXT-DECORATION: none; -moz-background-clip: border; -moz-background-origin: padding; -moz-background-inline-policy: continuous" height=20>300108</TD></TR><TR style="HEIGHT: 15pt" height=20><TD class=xl72 style="BORDER-RIGHT: windowtext 0.5pt solid; BORDER-TOP: windowtext 0.5pt solid; FONT-WEIGHT: 400; FONT-SIZE: 10pt; BACKGROUND: rgb(184,204,228); BORDER-LEFT: windowtext 0.5pt solid; COLOR: black; BORDER-BOTTOM: windowtext 0.5pt solid; FONT-FAMILY: Arial; HEIGHT: 15pt; TEXT-DECORATION: none; -moz-background-clip: border; -moz-background-origin: padding; -moz-background-inline-policy: continuous" height=20>300108</TD></TR><TR style="HEIGHT: 15pt" height=20><TD class=xl73 style="BORDER-RIGHT: windowtext 0.5pt solid; BORDER-TOP: windowtext 0.5pt solid; FONT-WEIGHT: 400; FONT-SIZE: 10pt; BACKGROUND: rgb(194,214,154); BORDER-LEFT: windowtext 0.5pt solid; COLOR: windowtext; BORDER-BOTTOM: windowtext 0.5pt solid; FONT-FAMILY: Calibri; HEIGHT: 15pt; TEXT-DECORATION: none; -moz-background-clip: border; -moz-background-origin: padding; -moz-background-inline-policy: continuous" height=20>300119</TD></TR><TR style="HEIGHT: 15pt" height=20><TD class=xl71 style="BORDER-RIGHT: windowtext 0.5pt solid; BORDER-TOP: windowtext 0.5pt solid; FONT-WEIGHT: 400; FONT-SIZE: 10pt; BACKGROUND: rgb(194,214,154); BORDER-LEFT: windowtext 0.5pt solid; COLOR: black; BORDER-BOTTOM: windowtext 0.5pt solid; FONT-FAMILY: Arial; HEIGHT: 15pt; TEXT-DECORATION: none; -moz-background-clip: border; -moz-background-origin: padding; -moz-background-inline-policy: continuous" height=20>300119</TD></TR><TR style="HEIGHT: 15pt" height=20><TD class=xl72 style="BORDER-RIGHT: windowtext 0.5pt solid; BORDER-TOP: windowtext 0.5pt solid; FONT-WEIGHT: 400; FONT-SIZE: 10pt; BACKGROUND: rgb(194,214,154); BORDER-LEFT: windowtext 0.5pt solid; COLOR: black; BORDER-BOTTOM: windowtext 0.5pt solid; FONT-FAMILY: Arial; HEIGHT: 15pt; TEXT-DECORATION: none; -moz-background-clip: border; -moz-background-origin: padding; -moz-background-inline-policy: continuous" height=20>300119</TD></TR><TR style="HEIGHT: 15pt" height=20><TD class=xl71 style="BORDER-RIGHT: windowtext 0.5pt solid; BORDER-TOP: windowtext 0.5pt solid; FONT-WEIGHT: 400; FONT-SIZE: 10pt; BACKGROUND: rgb(194,214,154); BORDER-LEFT: windowtext 0.5pt solid; COLOR: black; BORDER-BOTTOM: windowtext 0.5pt solid; FONT-FAMILY: Arial; HEIGHT: 15pt; TEXT-DECORATION: none; -moz-background-clip: border; -moz-background-origin: padding; -moz-background-inline-policy: continuous" height=20>300151</TD></TR><TR style="HEIGHT: 15pt" height=20><TD class=xl72 style="BORDER-RIGHT: windowtext 0.5pt solid; BORDER-TOP: windowtext 0.5pt solid; FONT-WEIGHT: 400; FONT-SIZE: 10pt; BACKGROUND: rgb(194,214,154); BORDER-LEFT: windowtext 0.5pt solid; COLOR: black; BORDER-BOTTOM: windowtext 0.5pt solid; FONT-FAMILY: Arial; HEIGHT: 15pt; TEXT-DECORATION: none; -moz-background-clip: border; -moz-background-origin: padding; -moz-background-inline-policy: continuous" height=20>300151</TD></TR><TR style="HEIGHT: 15pt" height=20><TD class=xl72 style="BORDER-RIGHT: windowtext 0.5pt solid; BORDER-TOP: windowtext 0.5pt solid; FONT-WEIGHT: 400; FONT-SIZE: 10pt; BACKGROUND: rgb(194,214,154); BORDER-LEFT: windowtext 0.5pt solid; COLOR: black; BORDER-BOTTOM: windowtext 0.5pt solid; FONT-FAMILY: Arial; HEIGHT: 15pt; TEXT-DECORATION: none; -moz-background-clip: border; -moz-background-origin: padding; -moz-background-inline-policy: continuous" height=20>300151</TD></TR><TR style="HEIGHT: 15pt" height=20><TD class=xl71 style="BORDER-RIGHT: windowtext 0.5pt solid; BORDER-TOP: windowtext 0.5pt solid; FONT-WEIGHT: 400; FONT-SIZE: 10pt; BACKGROUND: rgb(184,204,228); BORDER-LEFT: windowtext 0.5pt solid; COLOR: black; BORDER-BOTTOM: windowtext 0.5pt solid; FONT-FAMILY: Arial; HEIGHT: 15pt; TEXT-DECORATION: none; -moz-background-clip: border; -moz-background-origin: padding; -moz-background-inline-policy: continuous" height=20>300152</TD></TR><TR style="HEIGHT: 15pt" height=20><TD class=xl72 style="BORDER-RIGHT: windowtext 0.5pt solid; BORDER-TOP: windowtext 0.5pt solid; FONT-WEIGHT: 400; FONT-SIZE: 10pt; BACKGROUND: rgb(184,204,228); BORDER-LEFT: windowtext 0.5pt solid; COLOR: black; BORDER-BOTTOM: windowtext 0.5pt solid; FONT-FAMILY: Arial; HEIGHT: 15pt; TEXT-DECORATION: none; -moz-background-clip: border; -moz-background-origin: padding; -moz-background-inline-policy: continuous" height=20>300152</TD></TR><TR style="HEIGHT: 15pt" height=20><TD class=xl72 style="BORDER-RIGHT: windowtext 0.5pt solid; BORDER-TOP: windowtext 0.5pt solid; FONT-WEIGHT: 400; FONT-SIZE: 10pt; BACKGROUND: rgb(184,204,228); BORDER-LEFT: windowtext 0.5pt solid; COLOR: black; BORDER-BOTTOM: windowtext 0.5pt solid; FONT-FAMILY: Arial; HEIGHT: 15pt; TEXT-DECORATION: none; -moz-background-clip: border; -moz-background-origin: padding; -moz-background-inline-policy: continuous" height=20>300152</TD></TR><TR style="HEIGHT: 15pt" height=20><TD class=xl71 style="BORDER-RIGHT: windowtext 0.5pt solid; BORDER-TOP: windowtext 0.5pt solid; FONT-WEIGHT: 400; FONT-SIZE: 10pt; BACKGROUND: rgb(194,214,154); BORDER-LEFT: windowtext 0.5pt solid; COLOR: black; BORDER-BOTTOM: windowtext 0.5pt solid; FONT-FAMILY: Arial; HEIGHT: 15pt; TEXT-DECORATION: none; -moz-background-clip: border; -moz-background-origin: padding; -moz-background-inline-policy: continuous" height=20>300155</TD></TR></TBODY></TABLE>
it would be nice to have a robust solution that would format regardless of the sort order (as long as it wouldn't make the file run slow) but i would be very happy with a solution that depended on sorting if it was reliable.
thanks in advance and sorry if this should have been a new thread.