Colour help!

M

mynameistrudy

Hi,

I have a problem. I am making a spreadsheet for a computer company
for my A level ICT and in this spreadsheet I have a "stock" worksheet.
In this work sheet there is Stock name, compant field,type, quanty and
price field. When chosing which type the user wants to buy i want the
whole row to turn a differnt colour depending on what type they chose.
I have put a validation rule on the type field so that a list of 15
types of stock appear. How do i make it so the whole row changes
colour when they chose a type?

Thanks.

Trudy x
 
J

JLatham

Ok, Lets see if we can get you going without just handing you the answer to
the assignment.
Clue #1: This needs to key off of the worksheet's _Change event.
Clue #2: When a change in the column with your cells with the dropdown list
occurs, the _Change event needs to determine the value of 'Target' (the cell
that changed) and then use Select Case based on that value to set the color
for the row that Target is in to the appropriate color.
Clue #3: When trying to determine where the change took place (part of Clue
#2) look at the Application.Intersect function of VB.

Hope this helps.
 
J

JLatham

With 15 different 'types' to choose from, I think he's going to need a
combination of solutions - unless he has Excel 2007, earlier limits on
conditional formatting aren't going to allow him to use 15 colors?
 
Top