cell color

C

ChrisP

Hi.

I have a spreadsheet with about 7000 rows.
To make this readable I would like to add some conditional formating but I
just cant seem to get it right.


example If A!=B change the cellcolor of A to red

A B
1 1 1
2 3 5
3 2 2
4 4 1


Anyone got a clue?

Thanks alot!
 
C

ChrisP

sry

what I mean is that I want to perform the check on every row, like this

If A1!=B1 change the color
If A2!=B2 change the color
etc
etc

"ChrisP" skrev:
 
R

Roger Govier

Hi Chris

Mark the range A1:B7000
Format>Conditional Formatting>use dropdown for Formula Is> =A1=B1
Choose Format required

Note that in the formula pane it is essential to enter the starting =
 
C

ChrisP

hmm doesnt seem to do the right comparison.
It does highlight cells, but not like the code specifies.
It looks like the hightlight are totaly random.

Any other ideas?
Im all out :(


Btw != is the same as NOT()


"Roger Govier" skrev:
 
F

Farhad

Hi,

The right formula is:
=AND(B2,NOT(ISBLANK(B2)))

to avoid changing the color when the cells are blank.

Thanks,
 
F

Farhad

So if you want highlight cell A2 if it is not equal to B2 then you have to do
this:

active cell A2 go to menu: format>conditional formatting and then the first
combobox should be "cell value is:" and the second combobox sould be "not
equal to" and in the text box enter =B2 then click OK

you can copy the format of the cell B2 to any other cells that you need

Thanks,
 
D

David McRitchie

I think you meant the formula to be
=AND(A2<>B2,NOT(ISBLANK(B2)))

Why not Choose entire column(s)
If you want to color both cells or the entire row
you can change the formula to
=AND($A2<>$B2,NOT(ISBLANK($B2)
 
Top