Conditional Formating if Greater Than or Less Than other column

C

CClio333

Hi,

I have a spreadsheet with data in two worksheets. I need to compare the data
in each cell of column A in worksheet A to the data in each cell of column A
of worksheet B. If the value of a cell in worksheet A is greater, I need the
cell to be colored green. If the value is less, I need it to be coded red.
There is the same number of rows in both columns.

I have tried copying the column from worksheet B into worksheet A, but this
doesn't help much. The problem is that when I do the normal greater/less than
conditional formating, I can't copy and paste the formula down the column
because it will only look at the value of the first cell that I entered. I
don't know how to do codes or anything, so I don't know how to fix this.
 
P

Pete_UK

With both columns in one worksheet, highlight all the cells in column
A starting with A1 and click on Format | Conditional Formatting, then
in the first panel select Formula Is rather than Cell Value Is, and in
the next panel enter this formula:

=A1>B1

Click on the Format button, choose the Patterns tab (for background
colours) and choose your colour (green). Then click OK once to get
back to the CF dialogue box and click Add to set up the next condition
- select Formula Is again, and this formula:

=A1<B1

then click the Format button and choose Red as the background colour.
This time click OK twice.

Hope this helps.

Pete
 
S

Suleman Peerzade

Hi,

Its late but still give it a try. Say for eg you have to compare two columns
of salary and the creteria is as below. You need to put more conditions to
fullfill your requirements thats why i have added one more condition.

if salary less than 1000 = Red
if salary more than 1000 = Green
if salary more than 1000 but less than 2000 = Blue.

=IF(Sheet6!A2>Sheet7!A2,Sheet6!A2,Sheet7!A2)

Based on the above formula you can chalk down the limit as mentioned above
and do the conditional formatting.

Thanks
 

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