ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Conditional formatting not working with AND (https://www.excelbanter.com/excel-programming/444049-conditional-formatting-not-working.html)

Khuli[_2_]

Conditional formatting not working with AND
 
I have some conditional formatting to check that a value in column CO
does not match the value in column A, and that cell should not be
blank.

If I check against column A using
=CO31<OFFSET(CO31,0,1-COLUMN(CO31))
it works fine.

If I check the cell isn't blank using
=CO31<""
it works fine.

BUT if I combine both and use
=AND(CO31<OFFSET(CO31,0,1-COLUMN(CO31)), CO31<"")
then it doesn't work.

Anyone have any ideas? Thanks.

Jim Rech[_4_]

Conditional formatting not working with AND
 
Excellent question. It should work but it doesn't. Fortunately the less
job protecting way of writing the formula does work ;-)

=AND(CO31<A31,CO31<"")

You wrote it the way you did to avoid a circ? No need.

"Khuli" wrote in message
...
I have some conditional formatting to check that a value in column CO
does not match the value in column A, and that cell should not be
blank.

If I check against column A using
=CO31<OFFSET(CO31,0,1-COLUMN(CO31))
it works fine.

If I check the cell isn't blank using
=CO31<""
it works fine.

BUT if I combine both and use
=AND(CO31<OFFSET(CO31,0,1-COLUMN(CO31)), CO31<"")
then it doesn't work.

Anyone have any ideas? Thanks.



Khuli[_2_]

Conditional formatting not working with AND
 
Actually I wrote it that way because sections of the spreadsheet get
new cells added.

If you add a new cell above CO31, pushing it down to CO32, the
conditional format formula becomes:

=AND(CO32<A31,CO32<"")

which is no longer correct.

Thanks for confirming that the formula I had really ought to work
though!


On Dec 23, 2:13*pm, "Jim Rech" wrote:
Excellent question. *It should work but it doesn't. *Fortunately the less
job protecting way of writing the formula does work ;-)

=AND(CO31<A31,CO31<"")

You wrote it the way you did to avoid a circ? *No need.

"Khuli" wrote in message

...


Ron Rosenfeld[_2_]

Conditional formatting not working with AND
 
On Thu, 23 Dec 2010 02:42:06 -0800 (PST), Khuli wrote:

I have some conditional formatting to check that a value in column CO
does not match the value in column A, and that cell should not be
blank.

If I check against column A using
=CO31<OFFSET(CO31,0,1-COLUMN(CO31))
it works fine.

If I check the cell isn't blank using
=CO31<""
it works fine.

BUT if I combine both and use
=AND(CO31<OFFSET(CO31,0,1-COLUMN(CO31)), CO31<"")
then it doesn't work.

Anyone have any ideas? Thanks.


I, too, have no idea why it doesn't work. However, this equivalent formula does seem to work, and do what you need:

=(CO31<OFFSET(CO31,0,1-COLUMN(CO31)))*( CO31<"")



All times are GMT +1. The time now is 08:24 PM.

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