ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Worksheet Functions (https://www.excelbanter.com/excel-worksheet-functions/)
-   -   Conditional Formatting (https://www.excelbanter.com/excel-worksheet-functions/144195-conditional-formatting.html)

Mish80

Conditional Formatting
 
Hello -

I have two columns with different numbers in each. Let's call them column A
and column B. When column B is greater than or equal to column A... I'd like
to make it red. Unfortunately, I'm having trouble selecting multiple cells
to apply this to. I can only make it work one at a time... or referencing a
whole column to one number, rather than the other column.

I keep getting the error message:
"You cannot use a direct reference to a worksheet range in a conditional
formatting formula. Change the reference to a single cell, or use the
reference with a worksheet function, such as =SUM(A1:E5).

Your help is greatly appreciated.

Thanks!


FSt1

Conditional Formatting
 
hi,
if i understand you correctly, when the sum of column B is greater than the
sum of column A, turn red.
in column b put this conditional format.....
formula is......=IF(SUM(A1:A10)<=SUM(B1:B10),1,0)....choos e format.
if you put the same formula in column A with the <= sign reversed, then
column a will turn red and b will be colorless. when the sum of column b
exceeds the sum of column a, the colors reverse.
worked in my tests. using 2003 here.

Regards
FSt1
"Mish80" wrote:

Hello -

I have two columns with different numbers in each. Let's call them column A
and column B. When column B is greater than or equal to column A... I'd like
to make it red. Unfortunately, I'm having trouble selecting multiple cells
to apply this to. I can only make it work one at a time... or referencing a
whole column to one number, rather than the other column.

I keep getting the error message:
"You cannot use a direct reference to a worksheet range in a conditional
formatting formula. Change the reference to a single cell, or use the
reference with a worksheet function, such as =SUM(A1:E5).

Your help is greatly appreciated.

Thanks!


bpeltzer

Conditional Formatting
 
Let's suppose you're starting in row 1. Then select cell B1 and set your
conditional format for this cell: Format Conditional Formating. Choose
'formula is' in the first drop-down, and enter the formula =($B1$A1). Click
Format and choose the appropriate settings (pattern, font, etc). Finally
click OK.
Then select all the cells to which you want to apply similar conditional
formatting and hit ctrl+Y (repeating the prior change, in this case the
conditional formatting).

"Mish80" wrote:

Hello -

I have two columns with different numbers in each. Let's call them column A
and column B. When column B is greater than or equal to column A... I'd like
to make it red. Unfortunately, I'm having trouble selecting multiple cells
to apply this to. I can only make it work one at a time... or referencing a
whole column to one number, rather than the other column.

I keep getting the error message:
"You cannot use a direct reference to a worksheet range in a conditional
formatting formula. Change the reference to a single cell, or use the
reference with a worksheet function, such as =SUM(A1:E5).

Your help is greatly appreciated.

Thanks!



All times are GMT +1. The time now is 01:21 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com