Can you use formulas to manipulate the fill color of a cell?

G

Guest

I have Excel 2003. I want to change the fill color of a cell in relation to
it's own contents (ex. I will set a number as a goal for myself. There will
be a cell that will calculate my progress. While I am still under my goal
number, the fill color of the cell will be red and the text white - Once I
exceed my goal, the fill color will turn green and the text will be black).
 
G

Guest

How do you write this same code for a range of cells - all working
individualy according to the same goal (for instance: if the same goal is set
for a group of individuals, each having their own cell calculating thier
individual progress, each person's progress cell will show the correct color
according their own progress.)
 
G

Guest

kAustin79 said:
How do you write this same code for a range of cells - all working
individualy according to the same goal (for instance: if the same goal is set
for a group of individuals, each having their own cell calculating thier
individual progress, each person's progress cell will show the correct color
according their own progress.)

There is probably a slicker way to do it, but if you don't have very many
people,
just copy the code for as many as you have and change the cell assignment.
I used Cells(1, 1) which is Range("A1"), so all you would have to do is
change the additional subs to Cells(2, 1), Cells(3,1), etc. which would be
Range("A2),("A3"), and so on for as many as you have people. The assign each
individual their specific cell to keep score in. The only problem is making
sure that the wrong person's score does not get entered into someone elses
cell.

If you have a lot of people involved, you should consider using conditional
formatting
which does not require using the code module. It can be set up from the
Excel menu bar, Format > ConditionalFormating, then follow the options.
 
G

Guest

OK. Thanks

JLGWhiz said:
There is probably a slicker way to do it, but if you don't have very many
people,
just copy the code for as many as you have and change the cell assignment.
I used Cells(1, 1) which is Range("A1"), so all you would have to do is
change the additional subs to Cells(2, 1), Cells(3,1), etc. which would be
Range("A2),("A3"), and so on for as many as you have people. The assign each
individual their specific cell to keep score in. The only problem is making
sure that the wrong person's score does not get entered into someone elses
cell.

If you have a lot of people involved, you should consider using conditional
formatting
which does not require using the code module. It can be set up from the
Excel menu bar, Format > ConditionalFormating, then follow the options.
 

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