View Single Post
  #1   Report Post  
Posted to microsoft.public.excel.programming
LWhite LWhite is offline
external usenet poster
 
Posts: 1
Default Applying conditinal formatting to sorted results

Hello,

I have a list of products that is being sorted by more than a few
columns. I am wanting to apply different cell colors to the rows
depending on the values in the sort. The data is a list of toys. most
of the sort columns are Y or N answers.

My data is structured with the following column headers.
Product group
item number
description
has metal
has plastic
has paint
has stickers
has synthetic fiber

So what we have is data that looks something like this.
001XXX, 001001, plastic truck - red, Y, Y, N, Y, N
001XXX, 001002, plastic truck - blue,Y, Y, N, Y, N
001XXX, 001011, metal truck - red, Y, Y, Y, Y, N
001XXX, 001012, metal truck - blue, Y, Y, Y, Y, N
002XXX, 002010, doll - blonde, N, Y, N, N, Y
002XXX, 002011, doll - red, N, Y, N, N, Y
002XXX, 002012, doll - brown, N, Y, N, N, Y
002XXX, 002110, doll - blonde, Y, Y, N, N, Y
002XXX, 002111, doll - red, Y, Y, N, N, Y
002XXX, 002112, doll - brown, Y, Y, N, N, Y
003XXX, 003003, ball - large, N, Y, N, N, N, N, Y
003XXX, 003013, ball - medium, N, Y, N, N, N
003XXX, 003023, ball - small, N, Y, N, N, N

All trucks have the same group because they are trucks, but I want to
change the color of the rows the metal trucks are on because they have
paint. A sort of the entire sheet will structure things so that the Y/
N columns are together but it is still easy to miss a difference in
the attributes. Since my real data has around 6000 rows I would like
to do this with a loop and automatically change the color of a row to
another color. So the code should go through the group 001XXX and
change the last two rows to blue. Then start to do the same thing to
the 002XXX group. The sheet is sorted left to right but ignores part
number and description.

Can anyone here help me with this please?
LWhite