It has to be done this way because of the function. So, click in cell D4 and change its background colour to yellow. Once you have done this type the following formula into cell E4, then push enter. Note the 4,4 instead of D4.=Cell. Colour(4,4)The result of this formula will give the numerical value for the background colour yellow. The value should be 6.
Step 3. Ok, great stuff. We now have the numerical value for the background colour. Let’s assume you wish to run a formula in cell E4, and the formula is based upon the background colour in cell D4 (or 4,4) being either yellow or not yellow. You can overwrite the formula written earlier in cell E4 and replace it with the following code and then push return. Note the “If(Cell. Colour(4,4)=6”. This is essentially saying “if the background colour in cell D4 is yellow”=If(Cell.
Colour(4,4)=6. You get this because the background is yellow, so the answer is true. If you were to change the background colour then your answer would be “Not Yellow”. So we now have a formula based upon whether a background colour is yellow.
But you could also perform a calculation instead of simply displaying “Yellow”. Whatever calculation you want to perform needs to replace the “Yellow” section in the formula. This is because this the argument if value is true. You can also count the number of cells that contain black font, or any other colour. Please do provide feedback on my articles, or whether you know of a easier way to do this.
You might also find helpful in Excel..