View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
AB[_2_] AB[_2_] is offline
external usenet poster
 
Posts: 236
Default Shading pivot table based on value in 1st column

Perhaps i'm missing something but i'm not sure i saw anywhere in your
post what exactly you wanted to shade and based on what criteria...
Would it be the rows for the same student to be shaded differently
from the student above and below it?

On Jan 4, 7:30*am, BRC wrote:
Hi Al
I am looking for a way to format (shade) a pivot table to make it
easier to read. *I would like to alternate the background color. * For
simplicity sake lets say the table has student name in col A and the
classes for that student in col B. *So student 1 (S1) might have three
classes so there would be three rows devoted to S1 but Student 1 only
occurs in col A for the first occurrence (class) then col A is blank
until the next student appears. There are actually about 12 columns of
data for each class .
The closest post I found relating to this was titled “Shading rows of
with similar data” which discussed using conditiional formatting to
accomplish something very similar to what I am trying to do *but I
tried and could not get the code to run. *That post used the code:
=MOD(SUMPRODUCT(($A$1:$A1<"")/(COUNTIF($A$1:$A1;$A$1:$A1)+($A$1:$A
$1="")))*,2) * But Excel 2010 had problems with this code and it would
not execute.
Any thoughts or direction on this would be greatly appreciated. Thanks
BRC