change background color of cell as value changes

S

S Himmelrich

Here is the result I'm looking for in regards to changing color as
cell value changes in a column ("A"):

www.atlantissupport.com/example/example.xls

Basically I'm trying to change the background color of the cell as
the
data changes in Column A. Know that the values in Column A change
dynamically with other macro code that is already completed. Also I
must pre-define enough colors to cover for expansion in the future
(probably no more then twenty). I've kept the duplicates in Column A
thinking that this may help in coding this macro and will delete
those
after the background color is completed. I assume I can use offset
for moving the color to the smaller Column B.
Hope someone can help......
 
S

S Himmelrich

Sorry to be misleading on that. The example was for purposes of
demonstrating the final result. I'm already in macro mode as far as
the final results of that speadsheet, so conditional formatting is not
what I'm looking for. The referenced website you provided does not
address changing colors as values change so that isn't providing
anymore insight to my challenge. Thank you for effort and response.
 
J

JLGWhiz

You would have to use a change event code in the sheet module to do what you
are describing, if you don't use conditional formatting. To use up to twenty
colors, you would need to set up an algorithm, probably in the form of a case
statement, that would be called if any cell in Col A changes and if the value
of the chage equals one of the cases in the algorithm, the cell color would
change accordingly.
 
S

S Himmelrich

You would have to use a change event code in the sheet module to do what you
are describing, if you don't use conditional formatting.  To use up to twenty
colors, you would need to set up an algorithm, probably in the form of a case
statement, that would be called if any cell in Col A changes and if the value
of the chage equals one of the cases in the algorithm, the cell color would
change accordingly.






- Show quoted text -

Do you have any examples of this type of code?
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top