Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Excel calculation based on cell font color

Status
Not open for further replies.

joel009

Programmer
Jul 7, 2000
272
US
This problem was presented to me at work. I do not know if it is even possible. Any input appreciated.

We have data going into the cells with 3 or 4 different colors. Is there a way to use the font color in the cell to base calculations on?

Thanks in advance for looking
Joel

Joel
 


Hi,

USER colored cells as DATA is a really BAD policy. Color pallets are not necessarily consistent from one user to another.

Rather, it is better to use Conditional Formatting to color and format, which is based on data values. VALUES is what you need to calculate.

Of course, it is possible to TRY the color approach, but it is pitfall strewn.

Skip,

[glasses]Just traded in my old subtlety...
for a NUANCE![tongue]
 

Example
Code:
select case activecell.interior.color
  case vbblue
     'do blue calc here
  case vbred
     'do red calc here
  case vbgreen
     'do green calc here
end select


Skip,

[glasses]Just traded in my old subtlety...
for a NUANCE![tongue]
 
I'm 101% with Skip on this. Data should drive colour rather than colour driving data.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top