Join
the community
Sign-up
Ask a question »

Conditional formatting - Apply on more cells

May 2013


Conditional formatting - Apply on more cells



Issue


I’m not so familiar with conditional formatting, so i would like to ask something:
I'm making a doc where Column A has number values, column B also numbers, of rank positions. Conditional formatting of cell in column B would be: if number is greater than number in cell A, color it Red, and if it is less than number in cell A, color it green (rank position dropped down). Now, I managed that, but since the document has lots of rows, how do I apply the formatting on the other cells in the column? If i make copy/paste to them, formatting doesn't apply on the whole column since it is not a function, but a cell format. And do i have to do the formatting every day for every next column?

Solution


The "secret" is to make the formula with "relative referencing", hence, if your formula looks like this:

=$B$2>$A$2


then remove the $ sign before the row number, so it will look like this:
=$B2>$A2


With this, you actually don't need to copy the conditional formatting. You can select an entire range before applying it, and insert the formula as if you selected only the first cell at the top. Excel will know to apply the correct formulas to all the other cells in the range (assuming the range is a column).
Or you can apply this formula to the first row, and copy it with the format painter.

You can have a look at the video named "Highlight the entire row based upon a cell value (with a formula)" in the following address:
http://www.microsoft-office-excel.com/conditional-formatting.html

It gives an example of using a similar formula with such "relative referencing".

Note


Thanks to sheryljohnson for this tip on the forum.

See also

Knowledge communities.

Published by aakai1056
This document entitled « Conditional formatting - Apply on more cells » from Kioskea (en.kioskea.net) is made available under the Creative Commons license. You can copy, modify copies of this page, under the conditions stipulated by the license, as this note appears clearly.
Receive our newsletter

health.kioskea.net

Excel - How to count a letter's occurences within a Cell
Excel - How to count rows which show specified dates?