ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Discussion (Misc queries) (https://www.excelbanter.com/excel-discussion-misc-queries/)
-   -   Conditional Format Not Working (https://www.excelbanter.com/excel-discussion-misc-queries/61602-conditional-format-not-working.html)

KMH

Conditional Format Not Working
 
I have used conditional formatting extensively in the past, but I have
encountered a bizarre problem with applying it in this instance.

I want to compare 2 values in the same row (but different columns obviously)
to see if they are the same or different and change the background color of
the cell. I am using OFFSET and indirect functions to find the correct cells
to compare.

If I put the same formula in the conditional format statement and in the
cell itself, the conditional format is not changing the color when the
condition changes to true. The cell is calculating TRUE or false correctly
but no change in formats. (Yes, I have setup the change of formats in the
conditional format window)

Long term, I don't want to have the formula in the cell as well as in the
conditional format because I want the cell value to be able to be anything
while the format flags the changes for me.

I have tried switching from 1 worksheet and back. Recalcing, closing and
reopening and it still doesn't work.

For reference here's some more detail.
The formula in both conditional format and cell....
=INDIRECT($B9)<OFFSET(C$1,ROW(INDIRECT($B9))-1,relative_base-scenario)
C$1 is the top of the column this formula is in.
Cell B9 contains the name of a row where the data to compare is located
relative_base is a named row that contains the column number of the scenario
I want to compare to
scenario contains the column number of the scenario I am in

To make things weirder, the above formula always has the conditional format
on while the formula below (same basic calculation just formated differently)
always has the conditional format off.
=OFFSET(C$1,ROW(INDIRECT($B9))-1,0)<OFFSET(C$1,ROW(INDIRECT($B9))-1,relative_base-scenario)

What am I doing wrong or what quirk of Excel have I found? Thanks for any
help.
Ken

PS Does Excel 2003 have the conditional format limits (2050 rows) or is that
limitation gone now?



All times are GMT +1. The time now is 11:30 PM.

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