excel: conditional formatting, IF THEN statement - excel-formula

I have cell A2 with date format "dd-mmm-yy" and conditional formatted to highlight yellow if more than 7 days old. Once a date is entered into B2 I would like a formula to remove the highlight from A2.

Try this in your conditional formatting rule. If B2 is blank, and, today is more than A2 + 7 then format A2. If not, do nothing.
=AND(ISBLANK($B$2),TODAY()>$A$2+7)

Related

How to enable conditional formatting so that a cell becomes red whenever today's date becomes previous cell's date + work days?

Cell A1 (till A10) contains random date. I want B2 (till B10) to become red on the 3rd work day after A1. Also, if B is empty or NA then dont color B.
For example: if A1 = 18Oct, then B1 should become red on 23Oct. If A2 = 21Oct, then B2 should become red on 24Oct.
What code should I put in conditional formatting?
Highlight the relevant range in Column B, which is B1:B4 in the above example, enter the following formula as the formatting rule for conditional formatting:
=NETWORKDAYS($A1,$B1)=4

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!

Color the cell if the month has crossed 3rd month

I have data as below:
B2 = 23-Mar-2015
C2 = 09-Jun-2015
D2 = 17-Oct-2015
The formula should check for the month and ('B2' - Mar') once it crosses 3rd month (May) it should color the cell Green.
So, if 'B2' - today (only the month) then color the cell green.
Is it too much/ is it do-able?
Assuming you wish this to apply to each of B2, C2 and D2, please select from B2 to D2 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(B2<>"",TODAY()>EOMONTH(B2,2))
Format..., select green formatting, OK, OK.
This won’t trigger if the cell is blank but should when today is after the end of the second month following. So for March 23 not green on May 31, green on June 1.
To move by one month add/subtract 1 from the final 2 in the formula (may be negative).

Conditionally format one cell based on values in a column

The user enters a date/time into cell B2. If this matches one of the values in column L I would like to format cell B2 as red, else format cell B2 as green.
Any idea how to do this?
Please format B2 green with standard fill, then apply the following Use a formula to determine which cells to format, Format values where this formula is true:
=match(B2,L:L,0)>0
with formatting (red) to suit and Applies to B2.
Assuming you are using Excel 2007 onwards:
Set cell shading for B2 = Green
Select Cell B2 and select the Conditional Formatting > New Rule menu item
Use a formula to determine which cells to format
In the formula bar, put in =ISNUMBER(MATCH(B2,$L$6:$L$100,0))
For format, change shading to Red
Obviously change the $L$6:$L$100 to suit you, but that should do it...
What about breaking this up into two steps.
Try putting a simple formula in Cell B1:
=ISNUMBER(MATCH(B2, L:L, 0))
This will return a TRUE if there's a match and a FALSE if there is not a match. Then make two conditional rules based on Cell B1.

How to autofill the condition in conditional formatting in Excel?

Column A has a number 1-10. Column B has a string I want to highlight with conditional formatting. How do I make it so that if the number in Column A is greater than 7, the cell in the same row in Column B will automatically turn blue?
I use the conditional formatting tool for cell B1 such that, in the "Use a formula to determine which cells to format" option, I have ="IF($A1 > 7)", then fill the cell with blue.
But, as I drag/autofill down, the 1 in $A1 does not become A2, A3, A4, A5, A6, etc. as I want it to. What am I doing wrong?
Change the formula to:
=$A1 > 7
And take a look at my yoursumbuddy post, which explains why you don't need IFs in Conditional Formatting:
Select B1, then column B (This should make all the cells bluish except the cell B1, which is said to be the 'active' cell).
Open up conditional formatting and use the formula:
=IF($A1 > 7, 1)
You need to at least specify the value if true and there's no need to drag the conditional formatting down.

Resources