PC Review


Reply
Thread Tools Rate Thread

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

 
 
=?Utf-8?B?a0F1c3Rpbjc5?=
Guest
Posts: n/a
 
      17th Aug 2007
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).
 
Reply With Quote
 
 
 
 
=?Utf-8?B?a0F1c3Rpbjc5?=
Guest
Posts: n/a
 
      17th Aug 2007
Thank you very much. Great help!

"JLGWhiz" wrote:

> In the code, Change By Val to ByVal
>
> "kAustin79" wrote:
>
> > 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).

 
Reply With Quote
 
=?Utf-8?B?SkxHV2hpeg==?=
Guest
Posts: n/a
 
      17th Aug 2007
You could probably do the same thing with conditional formatting.

"kAustin79" wrote:

> 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).

 
Reply With Quote
 
=?Utf-8?B?SkxHV2hpeg==?=
Guest
Posts: n/a
 
      17th Aug 2007
In the code, Change By Val to ByVal

"kAustin79" wrote:

> 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).

 
Reply With Quote
 
=?Utf-8?B?a0F1c3Rpbjc5?=
Guest
Posts: n/a
 
      18th Aug 2007
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.)

"JLGWhiz" wrote:

> In the code, Change By Val to ByVal
>
> "kAustin79" wrote:
>
> > 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).

 
Reply With Quote
 
=?Utf-8?B?SkxHV2hpeg==?=
Guest
Posts: n/a
 
      18th Aug 2007


"kAustin79" wrote:

> 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.
 
Reply With Quote
 
=?Utf-8?B?a0F1c3Rpbjc5?=
Guest
Posts: n/a
 
      18th Aug 2007
OK. Thanks

"JLGWhiz" wrote:

>
>
> "kAustin79" wrote:
>
> > 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.

 
Reply With Quote
 
 
 
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
How do I fill one cell color with text html/rgb color from another thewris Microsoft Excel Misc 2 22nd Jan 2009 12:24 AM
RE: Can you use formulas to manipulate the fill color of a cell? =?Utf-8?B?SkxHV2hpeg==?= Microsoft Excel Programming 0 17th Aug 2007 10:53 PM
Match TextBox Back Color to Cell Fill Color =?Utf-8?B?QU1ZIFou?= Microsoft Excel Programming 4 12th Oct 2006 06:07 PM
Fill in Color within formulas =?Utf-8?B?VG9t?= Microsoft Excel Worksheet Functions 3 29th Aug 2006 03:57 AM
change fill color of a range of cells based on color of a cell? =?Utf-8?B?RGFyTWVsTmVs?= Microsoft Excel Programming 0 2nd Mar 2006 06:35 PM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 12:36 AM.