Conditional formating - apply on more cells [Solved/Closed]

Biljana - Nov 30, 2008 at 07:18 PM - Latest reply:  Raj - Aug 30, 2017 at 10:13 AM
Hello,
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 formating of cell in column B would be: if number is greater than number in cell A, colour it Red, and if it is less than number in cell A, colour it green (rank position dropped down). Now, I managed that, but since the document has lots of rows, how do I apply the formating 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 formating every day for every next column ?
See more

36 replies

sheryljohnson 5 Posts Saturday November 1, 2008Registration date December 15, 2008 Last seen -
+320
26
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".

Good luck!
To the person that asked the right question and gave that answer THANK YOU!
Thanks, you are a life saver.
This is awesome! Thanks for your help!
Thank you, that worked !
Thanks much...
Perinouk -
+17
2
Hi,

This is great. However I would like rows highlighted which are within a range. I tried the formula =(\$G2>0), (\$g2<21) but it isn't working. what's the right formula to use?

Thanks
you should try =AND((\$G2>0), (\$g2<21))
Thanks! Just the thing I was looking for! All I did was change the 'and' to 'or' and got the results I needed.
Nagoor Meeran Haji -
+13
Color Row based on value in a Column (#row)

Select all cells (Ctrl+a) (foobared in Excel 2003 hit Ctrl+A twice)
menu: Format, Conditional Formatting, Formula is on drop down box
Condition 1: =\$D1<=1.00 [interior Color 35 Light Green]
Condition 2: =\$D1<=1.05 [interior Color 36 Light Yellow]
Condition 3: =\$D1>1.05 [interior Color 38 Rose]

Since the conditions are checked in order it is frequently unnecessary to have more than one comparison in a condition. For example in Condition 2 above, we do not need to write the condition as
=AND(\$D1>1.00,=\$D1<-1.05)
Umair -
+11
Thanks mate. it was very helpful
heliburn -
+7
3
I need to copy the last 6 of a 17 number and letter Vin: number from col B and past into col F also I need to take the year of the vehicle from col C and paste it into col H and to be placed infront of numbers all ready there. please can some one help
To get the last 6 characters of your 17 character VIN number that is stored in column B, put this in column F: =RIGHT(B2,6)
I don't understand "...and letter Vin: number..." please clarify.
If you mean that you want the word "Vin: number" in front of the 6 characters you copied from column B, then type this into column F: ="Vin: number "&RIGHT(B2,6)
If you need a space between "Vin: number and the 6 characters, within the quotes, make sure you place a space after the letter `r' in the word number.
I think that if you want to overwrite the numbers that are already stored in column H, you would need to run VBA. This, if not done correctly might destroy data. You might consider concatenating the year in column C with the numbers that are stored in column H. To do that you can, in a new column, let's say column J, type this: =C2&H2