Excel conditional formatting per row cells - excel

Is it possible to create a conditional statement to do the following without having to create the conditional format for each row?
For each row, if row column D cell is less than the value of row column A cell I want it to highlight red. If row column D cell is greater than the value of row column A cell, I want it to highlight green.
Example:
if D1 < A1 Highlight RED
if D1 > A1 Highlight GREEN
if D2 < A2 Highlight RED
if D2 > A2 Highlight Green
and so on and so forth....

Assuming you want Column A's cells to highlight the color, set up your conditional formatting like this:
Formula: =$D1>$A1 for Green, =$D1<$A1 for Red
Then, make sure the "Applies To" range is correct (this is where I personally usually mess up):
Applies to (for both): $A$1:$A$10
If you want the row to highlight, then the "Applies to" range is =$1:$10 or just =$A$1:$D$10.

Related

Auto increment conditional formatting formula

I have a table which has two columns with a percentage value in each:
I would like every cell in the B column to be highlighted red if it is greater than the corresponding cell in the A column.
I have used the conditional formatting formula in cell B2:
=B2>A2
When copying down this conditional formatting formula into the rest of the cells in the B column, the formula does not auto increment. The expected behavior is that it would auto increment. E.g. in cell B3 the formula would auto increment to:
=B3>A3
When adding the formatting, I highlighted the whole B column rather than just the cell B2. I have also ensured the whole range is selected in the 'manage rules' section:

Conditional formatting a whole column based on the value of another column

I would like to apply conditional formatting to all of my column D. If Column D is < or > then the value in F by 150 (in the same row), I want it to highlight red. If the value of D is within the 150 above of below of the value in F then I want it to highlight green.
For example: D2 (360) is more than 150 more than F2 (88), so I want it to highlight red.
D10 (200) if within the 150 more or less range than F10 (275) so I want it to highlight green.
Below is the picture for the fields
Fields and Data
Format your cells all green. Then apply CF to cells where the difference is greater than 150 to colour those cells red. Here is the formula to use.
=ABS(D2-F2)>150

Excel - Cells to change color based on previous cell value

I am trying to create a formula in Excel whereby a cell would change color based on the value in the previous cell.
for example if cell B2 contains value X and then B3 contains value Y, I would like B3 to turn green if B3> B2 else to turn red.
'Standard' fill red the relevant range and select Column B, clear any existing CF rules and HOME > Styles - Conditional Formatting, New Rule..., Use a formula to determine which cells to format and Format values where this formula is true::
=AND(B1>B1048576,ROW()<>1)
Format..., select green fill, OK, OK.
I am assuming your column is labelled.

Highlight cells in one column based on date in adjacent column

How do I change the cell fill color of the cells in a certain column when it is 16 days past the dates in the adjacent column?
The cell should only change color if the cell does not have any text in it.
eg. Cell E1 should change to blue fill if today's date is 16 days past the date in cell D1 AND cell E1 is blank (there is no text entered in this cell).
In the image, cell E1 needs to be highlighted blue as there is no text in it and it is beyond 16 days past the date in cell D1.
How to change the cell fill color of the cells in a certain column when it is 16 days past the dates in the adjacent column. The cell should only change color if the cell does not have any text in it. eg. Cell E1 should change to Blue fill if today's date is 16 days past the date in cell D1.
with this one, you can try to use =now() in one cell once done, subtract that to your your cell e1, you can use conditional formatting tool on the top side of your menubar in excel. (home > Style) go to conditional formatting> highlight cell > more rule > use formula.
here's the sample one.
on your cell a1 , add this formula =e1-(date(year(now()),month(now()),day(now()))
once done, use the conditional formatting to hightlight the cell e1 when value of a1 =>16 days.
go to conditional formatting> highlight cell > greater than option, a new field will show, highlight the cell a1 then add > 16.
make sure that you are on cell e1 when doing the conditional formatting.
dont forget to tag this up if this helps you :)
I used =AND((TODAY()-(INDIRECT("RC[-1]",0))>16), ($E1="")) in the conditional formatting menu and then used the drag option. It works!

Excel: Alternate the color of each cell change?

How to alternate the color of each cell change?
Change the color whenever you replace the word in column A
You can use de color formating with this formula:
=MOD(SUMPRODUCT(($A$1:$A1<>"")/COUNTIF($A$1:$A1,$A$1:$A1&"")),2)=0
More info here: http://chandoo.org/forums/topic/yet-another-issue-of-alternating-colors
If you accept to have a hidden column, and do not want to use vba, the simplest thing to do would be to add a column (let's say a new column A, labels being now in B and values in C).
Column A will represent your target color. Set up conditional formatting on cells on columns B1 and C1 so that if A1 value is TRUE it they are grey (be careful that you get the value from A1 and not $A$1). Copy these B1 C1 cells downward.
Now to get the proper values in column A. You can set up A1 as being TRUE and A2 as being =IF(B2=B1,A1,NOT(A1))
Copy the formula from A2 downward. Cells in column B and C should now alternate color based on the change of label in column B.
You can now hide column A to make everything nicer.

Resources