Conditional formatting based on snother cell - excel-formula

I have a list of due dates in column j and a list of dates when the reports were submitted in column k
If tge due date is less than today (as in its now overdue) i want to put some formatting on thst overdue date to make it stand out but as soon as the submitted date is filled out i want the formatting to return to normal
How do I accomplish this?

Assume your due date starts on row 2. Select all the due dates and add a conditional formatting rule as follows:
=AND(I2<TODAY(), ISBLANK(J2))
and select the highlight format you want.

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:

Conditional formatting is not working for less than TODAY(), only for greater than

Conditional formatting does not apply to dates less than TODAY(), only greater than TODAY().
I have an IF statement with two VLOOKUPS inside. One of them outputs "Not Registered" if the cell looked is empty. The other, just copy the data that is on the other spreadsheet.
=IF(VLOOKUP($A5,Table,#MATCH(D$3,Headings,0))=0,"Not
Registered",VLOOKUP($A5,Table,#MATCH(D$3,Headings,0)))
Conditional formatting is set to:
cell values >= TODAY() are green
cell values < TODAY() are red
cell values = "Not Registered" are yellow
I suspect the conditional formatting is not reading properly the date. Every date cell is formatted as long date.
The problem comes up because A3 is empty.
Change the rules to use =Today() or populate A3 with the desired date.
Edit 1: If this is not working for you, check the data type of cells that should be red. If these are not real dates (but text), then they will never meet the condition. Make sure that all cells that look like dates actually contain dates (and not text).
If the lookup table stores the dates as text, then you can make the changes there, because the Vlookup will return the same data type.
Edit 2: Selecting a cell and changing its format will NOT convert text to a date. You can test if a date is really a date by changing its format to General. If this results in the cell showing a number, then it's a real date. But if the cell appearance does not change, the value is text and you need a different approach.
One option would be to use a helper column with a formula like =DateValue(A1). Copy the helper cells and paste them as values over the original cells, then format as date.
Or, put a zero into any cell, copy the cell, then select all cells that may or may not be dates and use Paste Special > tick "Add" > OK. That will convert dates stored as text back to their internal storage number. Then format the cells as dates.
Or, do the conversion after the Vlookup by wrapping a DateValue around the VLookup formula.
=DATEVALUE(VLOOKUP("a",A1:B1,2,0))
The "date" in B1 is really text. The Vlookup returns it as text, but the DateValue() then converts it to a date. If this one throws an error, the date text does not agree with your regional settings of what a date is expected to look like.
Reason:
Whenever the cell go past by the Less than today rule, computer will read that as zero so it will return true because zero is less than today.
Solution:
On the Conditional Formatting Rules Manager,try to enable the Stop if true for the not registered rule.

How to count cells that have conditional formatting

So I have a spreadsheet that keeps track of projects that includes a target date column and an actual date column. The actual date columns have been conditionally formatted to turn red or green if they meet the target date or white if N/A has been entered. Green is <=Target Date and Red is >Target Date.
I am trying to create metrics for these dates to see on time delivery etc. So I have the COUNT(Target Date) function to count the dates that have been entered which omits empty cells and cells with N/A. But I'm stuck on how to count cells that have turned green for on time delivery. I have tried the COUNTIF function and using the same rules (<=) as the conditional formatting to count the cells, but it is just returning with 0.
Is there any way around this?
The Range object has an attribute FormatConditions, which keeps the conditional formatting definitions. You can check this, using VBA. I don't think it's possible reading this using a simple formula.

How to use Conditional Formatting between a cell pulling info from a date and comparign to a cell that includes only text

I have an Excel spreadsheet that has sections broken out by month. The headers are individual month names, not dates. Each of these is color-coded to match the month. I have a single cell set aside to display the current month (using the TODAY function). I want to be able to style the cell depending on which month of the year it is.
I set 12 conditional formatting rules to check the cell against. I started out by using ="November" (as an example), but it doesn't seem to equate (TODAY()) with the word "November," so the rule doesn't apply. Either I need a new formula for the cell or there's some formula I have to use in the conditional formatting to get it to recognize the similarity between a date-formatted cell and a text-formatted cell.
Any ideas?
Assuming the cell is in A2, I would just change your conditional formatting formula to something like
=MONTH(A2)=11
TODAY() actually saves the Excel date value (e.g. 42695 for today) but using the MONTH() function will return the month number.
You could also alter the TODAY() formula to be something like
=TEXT(TODAY(),"mmmm")
That will convert the visible date to just show the month name and should still work for your original conditional formatting formula.

Conditional format based on a cell's color

I have a column with conditional formatting rules set to make the background one of three colors based on how close the date is in comparison to the current date (Today's date + 7, + 15, +30 days).
I want to extended the conditional format across to effect the entire row, rather than just the individual cell for the user more easily to see which item's date is approaching.
Is it possible to do a conditional format using a cell's format?
Update: To explain it further. Conditional format is set to a column: if a cell value is in between today's date and 7 days from today's date, it is formatted to have a green background. I want this format to extend across the ROW in which the value turns green.
Please try:
where the three formulae are:
Green =$A1<TODAY()+7
Orange =$A1<TODAY()+15
Yellow =$A1<TODAY()+30
and I have assumed each 'row' spans A:Z and your dates are in ColumnA.
This will highlight dates earlier than today also (though could easily be adjusted).
Just change the Applies to range to all the columns you want to be colored. You'll need to make sure you lock down the reference of the date column in the Conditional Formatting rule.
For example:
If your data is in columns A:H, then your Applies to range will be =$A:$H
If your date column is column C, then your conditional formatting rule (for C1) would be something like:
=AND($C1>=TODAY(),$C1<=TODAY()+7)

Resources