Hi, I am wanting to format Cell C to be coloured green when Cell A - Cell B lies between -2 and 2 , hope someone can help.TIA
Last edited by derekfarr; 03-11-2011 at 05:05 AM.
Assuming we're talking about C1 ... with C1 the active cell apply a Conditional Format FormulaIs rule of:
=ABS($A1-$B1)<=2 format Green
My Recommended Reading:
Volatility
Sumproduct & Arrays
Pivot Intro
Email from XL - VBA & Outlook VBA
Function Dictionary & Function Translations
Dynamic Named Ranges
You can also do this:
Activate the cell in question
Open format cell
Choose tab Number
Choose Category Custom
Put the text below in as Type
Now you can drag the formula and the format will follow.[Black][<=-2]-0.00;[Black][>=2]0.00;[Green]0.00
That's true if
a) C actually contains =A-B (unspecified)
b) You wish to format the Font rather than Interior Fill
My Recommended Reading:
Volatility
Sumproduct & Arrays
Pivot Intro
Email from XL - VBA & Outlook VBA
Function Dictionary & Function Translations
Dynamic Named Ranges
Right. But I have a question. I tried to copy exactly what you wrote in your first reply into cell c1 and got and error. Does it only work in 2010 (I use 2007) or what are I doing wrong.
The formula posted is not to be placed in C1 rather it is for a Conditional Format rule.
(if placed directly in C1 the formula would return either TRUE or FALSE - assuming both A1 & B1 are numbers/blank of course)
My Recommended Reading:
Volatility
Sumproduct & Arrays
Pivot Intro
Email from XL - VBA & Outlook VBA
Function Dictionary & Function Translations
Dynamic Named Ranges
Sorry for my stupidity, i have not used Conditional Format FormulaIs before.
Thanks Donkey it worked a treat
There are currently 1 users browsing this thread. (0 members and 1 guests)
Bookmarks