formulas

Public Schedule Face-to-Face & Online Instructor-Led Training - View dates & book

Forum home » Delegate support and help forum » Microsoft Excel Training and help » Formulas

Formulas

resolvedResolved · Medium Priority · Version 2003

Aimee has attended:
Excel Advanced course

Formulas

How can you write a formula or macro to change the color of text in a cell if the math is incorrect. For instance if a number is negative or above a certain number and you want it to stand out in red.

RE: Formulas

Hello Aimee

Thank you for your question and welcome to the forum.

I think you will be able to accomplish this using conditional formatting.

To apply conditional formatting:
1. Select the cells which you want the highlighting/colour to be applied to.
2. Go to Format - Conditional Formatting.
3. Set a condition, e.g. Cell Value is less than 0.
4. Click the Format button to create the formatting that will be applied if values in the selected cells if the criteria is met, e.g. select red colour on the Patterns tab. Click OK, and OK again to apply your condition to the selected cells.

Kind regards
Amanda

Thu 29 Oct 2009: Automatically marked as resolved.


 

Excel tip:

Difference between Two Dates

The DATEDIF function computes the difference between two dates. The DATEDIF function is as follows:

=DATEDIF (Date1,Date2,Interval)

Please note that Date1 must be less than (earlier) or equal to Date2

Please note that Interval must be one of the following codes: "d" (in days), "m" (in months), "y" (in years) expressed in quotes


View all Excel hints and tips


Server loaded in 0.08 secs.