Excel - Conditional Formatting and Cell References

Asked By DOUGECKER on 03-Sep-08 12:58 PM
I've worked out how to format a row based on one cell in the row but when I
try to copy that formula to my entire column every row's color is conditional
to the value of the first cell, not to the cell for each respective row.

(Same question as SlyGuy2183, but I could not see where he had received a
satsifactory answer.  My question is the same).

I have no absolute references, i.e., no "$"s in my formula).   Formula is
formula to cell N3, it still refers to cell K2 instead of to cell K3.

'Suggestions?

DOUG




Bernie Deitrick replied on 03-Sep-08 02:11 PM
Doug,

Select N2, then use Format / Conditional Formatting     Cell Value is       Greater than or equal to
=K2


HTH,
Bernie
MS Excel MVP
DOUGECKER replied on 03-Sep-08 02:23 PM
Bernie:  I can change the cell references one-by-one, but that is too labor
intensive.  Is there not a way to adjust the formula automatically?  I
thought Paste Special>Formulas would do so, but it maintains the original
cell reference in the conditional formatting formula, without any adjustments
as to the row.

DOUG
Bernie Deitrick replied on 03-Sep-08 02:28 PM
Doug,

I think we may be talking at cross purposes.

Are you talking about formulas in the cell, or formulas in the Conditional Formatting? The CF cell
references will automatically update to the correct row if the CF cell reference is =K2 and not
=$K$2, or =K$2  (a fourth possibility is =$K2, but that would work for additional rows within the
column) when you copy and paste formats (or paste all)...

HTH,
Bernie
MS Excel MVP
DOUGECKER replied on 03-Sep-08 02:42 PM
Bernie:  It should do that, but it does not do that.  All of the subsequent
references in the column are to the original cell and not to the subsequent
cells in the same row, despite the fact I did not use an absolute reference
in the original formula.  It is very frustrating, because I have to fix about
100 cells throughout the workbook.

I have tried Copy>Paste Special>Formulas and dragging the little black cross
down the column to duplicate the same formula in subsequent rows.  Neither
method worked as advertised.  (This was not a problem in Office 2003, as far
as I know).

DOUG
Bernie Deitrick replied on 03-Sep-08 03:11 PM
Doug,

Are you using Excel 2007?   Try a rule with the formula

=N2>=K2

HTH,
Bernie
MS Excel MVP
DOUGECKER replied on 03-Sep-08 03:55 PM
Bernie:  That left the cell color unchanged...

DOUG
Bernie Deitrick replied on 03-Sep-08 04:01 PM
Doug,

Did you set a color? And did the formula references increment properly? And is the value in N2 >=
the value in K2?  What does the formula return when entered in a cell (its should return TRUE or
FALSE - TRUE will apply the CF....)

I haven't ever had the type of trouble you are describing.... so it's hard to say where things are
going astray.

Bernie
MS Excel MVP
DOUGECKER replied on 03-Sep-08 04:23 PM
Bernie:  I went back to formatting it as a cell value instead of a formula,
but it still seems to think that 20 is smaller than 19.  The cell references
are "n2>=m2 (is blue)", but it shows up as bright red instead.  'Odd, yes?

I am trying to format based on comparing cell values, rather than a
threshold number.

DOUG
Bernie Deitrick replied on 03-Sep-08 04:27 PM
Doug,

This does not seem correct


Try

=N2>=M2

The color is set through the formatting dialog, not the formula.

HTH,
Bernie
MS Excel MVP
DOUGECKER replied on 03-Sep-08 04:36 PM
Bernie:  "Is blue" is just me telling you that the fill is set to blue under
those conditions.  I tried your formula and it had no effect on the cell.
Also, I tried using a cell value of "this cell greater than or equal to that
cell" - which gave me the opposite result of my instructions.  I don't what
to say - or do, more importantly.

DOUG
Bernie Deitrick replied on 03-Sep-08 04:43 PM
Post your email address and I will send you a working example..  Which version are you using?

Or send me your file... take out the space and change at to @ and dot to .
HTH,
Bernie
MS Excel MVP