Related:
- Increment cell value according to cell colour
- Crimping colour code - Guide
- If cell contains date then return value ✓ - Excel Forum
- Excel: If Date =, then enter a value ✓ - Excel Forum
- Excel formula to check if cell contains a date - Excel Forum
- An example of a cell is a blank cell ✓ - Programming Forum
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!)