Functions & Colors

  • Thread starter Thread starter Jason
  • Start date Start date
J

Jason

I am getting started with functions and I have a
question. Is there a way to make a function so that if,
for example,

(A1)=(XY) then the cell will be (Brown), but if (A1)=(BC)
then the cell will be (Red)

I have looked in the help files, but can't seem to find
anything on the subject. Maybe I am not looking for the
right things, but I can't find it. Can anyone help?

Jason
 
Hi Jason,
I have a page on Conditional Formatting that would probably
help you. There is a limit of 3 Conditional Formats per cell
http://www.mvps.org/dmcritchie/excel/condfmt.htm

The advantage of C.F. is that it is builtin to Excel and it
does not matter how the value changed as a constant or
by recalculating a formula.

But If you need more than a selection of three colors (+ default)
per cell then you would probably want an Event Macro
http://www.mvps.org/dmcritchie/excel/event.htm#case
which is invoked for an event such as manually changing
the content in a cell.

If you have to use a macro then you also have to specify
the color you want and for that you would also want to look at
http://www.mvps.org/dmcritchie/excel/colors.htm
 
Back
Top