Conditional Formatting and Cell References

D

DOUG ECKERT

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
"cell value (in N3) >=K2, color it blue". When I extend that conditional
formula to cell N3, it still refers to cell K2 instead of to cell K3.

'Suggestions?

DOUG
 
B

Bernie Deitrick

Doug,

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


HTH,
Bernie
MS Excel MVP
 
D

DOUG ECKERT

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
 
B

Bernie Deitrick

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
 
B

Bernie Deitrick

Doug,

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

=N2>=K2

HTH,
Bernie
MS Excel MVP
 
B

Bernie Deitrick

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
 
D

DOUG ECKERT

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
 
B

Bernie Deitrick

Doug,

This doesn't seem correct

"n2>=m2 (is blue)",

Try

=N2>=M2

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

HTH,
Bernie
MS Excel MVP
 
D

DOUG ECKERT

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
 
B

Bernie Deitrick

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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top