View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.misc
Sheeloo[_3_] Sheeloo[_3_] is offline
external usenet poster
 
Posts: 1,805
Default Changing row color for each change in col A

One way is to use an helper column, say Col B
Enter 1 in B1
Enter this in B2 and copy down till end of your data set
=IF(A2=A1,B1,IF(B1=1,2,1))

This will give you an alternating series of 1s and 2s.
Now you can select your data range, including the helper column, and choose
Conditional Formatting...
Choose formula is
=$B1=1 for one color
and
=$B1=2 for another color

Repace B with the Col you choose
"Michael" wrote:

I have a sheet we use to track vendors and each vendor is assigned a
cost package (budget code) in Column A. I would like to conditionally
alternate row colors for each budget code, not each line. The budget
codes are not even/odd and don't change incrementally. It would need
to work automatically so that when a row is inserted in a budget code
grouping, the row color would update. The idea is similar to the
Subtotal command in that I want alternating row colors for each change
in Column A. Thank you.