groovygarden
Programmer
- Aug 23, 2001
- 63
I've been trying to figure this out for the last couple of hours. Any help appreciated!
I have a cell, say B2, and want to add an IF statement to it. If the statement returns true, I want to run a function which will change the colour of B2.
I think that IF statement would look something like:
The function must change the colour of my cell, B2, based on the value in cell A2.
I know I should use a CASE Statement, but that's about all I know. How do I pass in the value of A2? How do I tell the function that it is cell B2 it needs to change?
I've been trying without much luck. I often find that, when the IF statement returns true and the function tries to run, I get an error message in cell B2 "#NAME"
Any help appreciated
I have a cell, say B2, and want to add an IF statement to it. If the statement returns true, I want to run a function which will change the colour of B2.
I think that IF statement would look something like:
Code:
=IF(A1=B1,colourFunction())
The function must change the colour of my cell, B2, based on the value in cell A2.
I know I should use a CASE Statement, but that's about all I know. How do I pass in the value of A2? How do I tell the function that it is cell B2 it needs to change?
I've been trying without much luck. I often find that, when the IF statement returns true and the function tries to run, I get an error message in cell B2 "#NAME"
Any help appreciated