Conditional formatting on dates older than a month in Excel - excel

I have a column in my table that has dates, and I want to highlight any that are over a month old. I've been given the formula =B5<TODAY()-30, but when I try apply that to multiple fields it only takes it from B5, so highlights all of them.
I've seen a few if statements that play with dates, but I can't get them to work either (I can't find them any more).
How can I get this to work over the whole column, not just the one?

Your formula is correct, but make sure you enter it like this:
Select the range that starts with B5 and goes down as far as you want before opening the Conditional Formatting dialog.
Select: New Rule.
Select: Use a formula to determine which cells to format
Enter your formula into the box labeled, "Format values where this formula is true"
Click on the Format button and select the formats you wish.
Confirm.

Related

Excel Conditional formatting Dates older then 60 days

I'm trying to use one Conditional formatting rule that does the following:
Ignore Blank Cells
Ignore Cells that do not have a date value
Highlight Dates that are going to expire in 30 days
So i have a list of dates:
07/25/2021
06/25/2021
05/25/2021
etc...
i used the custom formula under conditional formatting and used the following codes:
=CountIF(A:Z,today()-30)
i also used
=CountIF(A:Z,"<="&today()-30)
both codes highlight blank cells, i tried using the IF statements or IsBlank statements but i don't think i fully understand how those work. because i made a mess.
regardless of what i do, cells that are non-dates and blank cells are highlighted.
i even tried using the the conditional formatting rule, "Format only cells that contain" and i added the following:
Format Only cells with:
Cell value - less than or equal to - Today()-30
what do you guys think im doing wrong?
Assuming that your dates are in column B:
Select entire column B.
From menu start Format / Conditional formatting...
Add a new rule with the plus sign.
At Style select Classic.
After select Use a formula to determine which cells to format
Enter this expression: =AND($B1<>"",$B1<=TODAY()-30)
Select a desired formatting.
You can easily adjust this to row or any other range, or +30 days etc.
If you need more columns, select all of them, and assuming that the first column is A, the formula should be: =AND(A1<>"",A1<=TODAY()-30). See the screenshot below with formula and some example data:

Is there a way in excel to apply a formula based conditional format for an entire column?

So I have these columns:
And what I would like to have each cell under the "Completed Date" column change color according to whether the date is before or after the due date or if it's blank. I'd like to do it in a way where I don't have to set the conditions for each cell individually but rather in a sort of "drag through" way, like when you use a formula, and you drag that formula down, it applies to each adjacent cell on the way down. Any assistance with this would be most appreciated. Thanks!!
As #cybernetic.nomad says, get it right for the top-left cell and the rest will follow. For example, if you want to highlight where the completion date is after the due date, put
=AND(ISODD(COLUMN()),B2>A2)
as a custom formula.
You will need separate rules to highlight blanks and completion dates equal to or before before the due date.
What happens if your range starts in column A, so there is no column before it? A strange quirk of conditional formatting is that it allows you to wrap it around to the very last column (XFD), so in this case your formula would look like this:
=AND(ISEVEN(COLUMN()),A2>XFD2)

I need a formula that flags after 45 days

I need a formula that will generate a flag. Basically Column A would have a specific date. I need the next column to generate a flag if the current date is 45 days after the original (A).
I'm not sure how to type in the formula.
I think what you want to utilize is an if statement with the TODAY() function.
Here's an example of how to accomplish what you're looking for. I added some conditional formatting to help color code the result.
I would suggest that you use conditional formatting to get this result.
Highlight the cell (or range of cells) that you want to be flagged if the trigger point is hit and click "Conditional formatting" -> "New Rule".
From the new window that opened, select the bottom option that should be "Use a formula to determine which cells to format".
In the box in the bottom half of the "New Formatting Rule" window, type the following:
=(Today()-A1)>45
Note: A1 should be the first cell in the range you selected to check (the dates) and 45 is the number of days from today you want to be the flag.
Then click the "Format" button to apply what ever kind of flag you want.
In the above example, the cell will be filled red and text will be set to white. This would be a good conditional formatting rule to apply to the actual date range so that the date itself is flagged.

Excel: Highlighting a whole column depending on date

I have made my own Gantt chart in Excel, which is shown in this picture:
.
I would like to highlight the whole column (or until the last activity) depending on the date, as shown in the picture. I figured out how to highlight a single cell depending on the date, but not a whole column.
I don't know how to do it short of entering the date into the whole column, but I thought there would be something more efficient if conditional formatting is used.
If you'd like an entire range to conditionally format based on the value of one of the fields in the range, use an absolute cell reference. I couldn't figure out perfectly from your picture which cell contains the date, but I'll try to give you an example.
If you have dates in the Cells in Row 1, and you want to highlight the entire column when the row has today's date, the conditional format formula would look like below. (Assuming today's date is in cell C1, then the entire column from C1:C25 [the range upon which I applied the conditional format] will be highlighted).
Steps:
Highlight the entire range upon which you want to apply the formatting. In my example, I'm using range A1:H25
In the Excel Ribbon, select Home > Conditional Formatting > New Rule...
On Windows, select Use a formula to determine which cells to format. On macOS, first choose Classic from the Style dropdown menu and then from the second dropdown menu, pick Use a formula to determine which cells to format.
The formula will be =A$1=TODAY() [NOTE: We check cell A1 first because it is the first cell in our highlighted range. We choose $1 because the dates are always in Row 1. Change that to suit.]
Select the format you'd like to apply
To test out how it looks, press OK

IF/AND between two dates Conditional Formatting

I am trying to implement the following logic but my formulas are not encompassing all possibilities.
Am I able to accomplish the following using the approach outlined below?
C5 has a start date(yy/mm/dd), 2013-10-01.
D5 has an end date(yy/mm/dd),2013-10-23.
F3->CX2 has 7 cells merged with the monday's date in the cell.
Example: F3: 30-Sep-13, M3: 07-Oct-13, T3: 14-Oct-13.
F4->CX4 and below are the unmerged seven cells, therefore you have seven cells below each week cell.
My goal is to use Conditional Formatting when cell has value TRUE to fill the background colour of each individual cell between the start and the end date. However I am having trouble determining the correct formula. I have tried the following in F4 and across and below but none have proven to work for all scenario's:
F4=AND(C5=F3, D5>=F3) F5=AND(C5=(F3+1), D5>=(F3+1))...
only fills the cell for the start date not all the cells between the start and end date.
In short, I need to identify the start cell and fill it, continue filling all cells until the end date.
Should this be a macro with a while loop?
***I Believe I have solved my question with the following formula:
=IF(AND((F3)>=$C$5,(F3)<=$D$5),TRUE,FALSE), =IF(AND((F3+1)>=$C$5,(F3+1)<=$D$5),TRUE,FALSE), =IF(AND((F3+2)>=$C$5,(F3+2)<=$D$5),TRUE,FALSE)...Then after 7 cells it becomes: =IF(AND((M3+1)>=$C$5,(M3+1)<=$D$5),TRUE,FALSE), =IF(AND((M3+1)>=$C$5,(M3+1)<=$D$5),TRUE,FALSE)
Should this be a macro with a while loop?
It seems it does not have to be, though that depends upon my interpretation of your question, which seems odd if only because the conditions are not in the rows for which they trigger the formatting.
Select the applicable range starting in F4 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($F$3+COLUMN()-6>=$C5,$F$3+COLUMN()-6<=$D5)
Format..., select choice of formatting, OK, OK.
Here's a stepwise view on the problem as I see it:
Set up your data and include the actual date of your "weekly view" as part of the sheet:
Add conditional formatting to a single cell (say, Monday of Week 1) that applies to "a formula to determine which cells to format":
Copy-and-Paste-formats to the remainder of the cells:
The result should resemble:
Change the actual cell formatting to "" to remove the date from view:
The removes the capability to insert any content in the cells (but that wasn't part of the question). If you want to insert content and maintain colouring, you can base the conditional formatting on a similar-sized/shaped layout elsewhere in the sheet and format it accordingly. For example, the following layout provides this yet allows you to enter content in the conditionally formatted area:
Use the formula conditions. I put a start date in A1, and an end date in A2. Modify as needed per your requirements.
Then I will apply conditional formatting to values in range E1:E6. Again, modify as per your requirements.
Then simply use Highlight cells Rules > Between
Then, select your start/end values and press OK. Voila!

Resources