Font color dipicts which formula to use

N

nbaker

Is there a way in Excel to have two different formulas and if the number in
the cell color in black it uses one formula and if the color of the number in
the cell is red it uses a different formula?

Example:
40 hours of payroll multiplies the hourly wage by the 40 hours if
43 hours in red color font the formula would say if 40 > then multiply the
40 hours by the regular hourly wage and the 3 by a differently wage, but if
the font color was still black it would multiply all 43 hours by the regular
wage?
 
D

David M

If you are using 2007, when on the "Home" ribbon, go down to "Styles" from
there, go into "Conditional Formatting" Go down all the way to the bottom and
create the new rule.

Of course, you first want to select all the Rows/Columns that you are
wanting to apply the rule to. Hope this has been of assistance!
 
D

Dave

Hi,
If you are not using xl2007, it's a bit more complex. You can't change the
formula according to font colour without using a macro. But you can use one
of the criteria that you used to colour the cells in the first place, and put
it into an IF formula.
eg:
IF(criteria_Black,Formula1,Formula2)
This says that if the text is black, use formula1, otherwise use Formula2.
If you need help with the syntax of the IF formula, supply details of the
colour criteria and the formulas you want to use.
Regards - Dave.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top