ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Discussion (Misc queries) (https://www.excelbanter.com/excel-discussion-misc-queries/)
-   -   Conditional Format a cell that contains a function (https://www.excelbanter.com/excel-discussion-misc-queries/165542-conditional-format-cell-contains-function.html)

Matheus

Conditional Format a cell that contains a function
 
I have the following conditions to format Cell C5:

Condition 1: If C5 is "" -- No Fill on C5
Condition 2: If C6 is "" -- Gray on C5
Condition 3: If C5 <= C6 -- Green on C5
Condition 4: If C5 C6 -- Red on C5

Both C5 and C6 contains VLOOKUP function and both conditions 1 and 2 don't
work becase the cells are not blank - they contain the VLOOKUP.

Does anybody know a way arround this?

T. Valko

Conditional Format a cell that contains a function
 
conditions 1 and 2 don't work becase the cells are
not blank - they contain the VLOOKUP.


Do the lookup formulas return blank cells?

Try this:

Condition 1 RED: =AND(COUNT(C5:C6)=2,C5C6)
Condition 2 GREEN: =AND(COUNT(C5:C6)=2,C5<=C6)
Condiion 3 GRAY: =AND(COUNT(C5),C6="")

--
Biff
Microsoft Excel MVP


"Matheus" wrote in message
...
I have the following conditions to format Cell C5:

Condition 1: If C5 is "" -- No Fill on C5
Condition 2: If C6 is "" -- Gray on C5
Condition 3: If C5 <= C6 -- Green on C5
Condition 4: If C5 C6 -- Red on C5

Both C5 and C6 contains VLOOKUP function and both conditions 1 and 2 don't
work becase the cells are not blank - they contain the VLOOKUP.

Does anybody know a way arround this?





All times are GMT +1. The time now is 02:54 PM.

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