Related:
- Increment cell value according to cell colour
- How to delete cell in word - Guide
- Rj45 colour code - Guide
- Excel multiple lines in one cell - Guide
- How to change text colour html - Guide
- Best cell phone 2023 - Home - Buying guides
4 responses
Do not use a color to determine the displayed result, but use the value. The only "resource" that cares about the color is a HUMAN! What value in the cell determines the color, and check for the internal value of the cell, not the color!
Thank you ac3mark, but this doesn't answer my question, please treat me as a complete excel dummy. :)
No problems!
What determines the colors? A number? Check the value of the cell, not the color.
So where you use: c.Interior.ColorIndex, change that to validate a value, instead of some color index. Something like:
if c.value =.05 then Countcolour = Countcolour + 1
if c.value =1 then Countcolour = Countcolour + .05
Initialize variables that are equal to the color name, if you have to use the color index(in that case, this sounds like homework, at which I say I don't do homework!)
What determines the colors? A number? Check the value of the cell, not the color.
So where you use: c.Interior.ColorIndex, change that to validate a value, instead of some color index. Something like:
if c.value =.05 then Countcolour = Countcolour + 1
if c.value =1 then Countcolour = Countcolour + .05
Initialize variables that are equal to the color name, if you have to use the color index(in that case, this sounds like homework, at which I say I don't do homework!)