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:
Related
I am aware of using MAX for conditional formatting however I am confused about how to compare two different columns. I would like to use conditional formatting to compare data/value from columns B and Columns E, then highlight the highest value in each row based on these two columns. I wonder if this is possible?
It does not seem working for this:
enter image description here
You can use conditional formatting to achieve this:
Select the entire range (for example, B1:E10)
Add a new conditional formatting rule.
Home >> Conditional Formatting >> New Rule >> Use a formula to determine which cells to format:
=($E1>$B1)
=($B1>$E1)
Just make sure you type the Formula rather than selecting the cell, or you will have the $ symbol in the reference, which you don't want in the row reference.
So highlight the largest value in each row? That is possible using conditional formatting.
For example, if your entire data frame is in A2:B11, first do =B2>A2 then =A2>B2.
The steps for conditional formatting are below:
highlight the full column of cells you wish to format (in this case, say A2:A11)
Home->Conditional Formatting->New Rule->"Use formula..."
Enter the above formula (being sure to unfreeze column and row references)
Format->Fill->Select Color->Okay->Okay
I'm trying to highlight rows created within the past 7 day period (since the last time checked). The table is tied to an external source that formats the column based on NOW (i.e., m/d/yyyy h:mm). So far, I found that conditional formatting is quite finicky when using functions.
First, I'll give the two formulas, which are working now. These are both based on a TODAY() format (i.e., mm/dd/yyyy)
1. =today()>$g2 --- this highlights past due items
2. =DATEDIF(TODAY(),$G2,"d")<30 --- this highlights items due within the next 30 days.
Now I need to reference another column (M), which is based on the NOW format mentioned above. I want the whole row formatted, so I can't use the built in functionality. I've used variations of the above, interchanging NOW() and TODAY(). Additionally, I cannot seem to get AND() to work in conditional formatting of an entire row. Any assistance would be greatly appreciated.
Select the entire sheet first, as conditional formatting only works on selected cells.
Make sure all rows in your sheet are selected.
On the Home tab, in the Styles group, click the arrow next to Conditional Formatting > New rule.
In the New Formatting Rule dialog box, click "Use a formula to determine which cells to format".
Under Format values where this formula is true, type the formula: =$M1>TODAY() . (example provided as your required formula was not provided).
The formula uses the TODAY function to see if the dates in column M are greater than today (in the future). If so, the cells are formatted.
Click Format.
In the Color box, select your colour. Use other formatting commands as required.
Click OK until the dialog boxes are closed.
The formatting is applied to column M when the condition is met.
thanks in advance for the help.
I'm making a Gantt chart in Excel and am trying to integrate the capability to highlight the work week (WW). The idea is that one can select the WW from a drop down menu and the corresponding columns in the chart are highlighted. I am struggling with the conditional formatting formula to highlight the desired dates.
Here's a screen shot of how the chart is set up
I am able to highlight the column of the cell containing the WW value (e.g. in picture column I is highlighted as it contains "WW42" in cell I3. I would like to be able to highlight the days from Sunday to Saturday of each WW.
Most formulas (that I know) work on the value of the cells rather than their location or index. I have tried simply filling in all the blank cells with the WW value and then hiding the value, but the formatting isn't aesthetically pleasing and it's not efficient.
I have also tried merging the WW cells, but am unable to select all columns of the length of the merged cell, just the first column associated. For example, if I merged I3 to O3, conditional formatting will highlight that merged cell and only column I.
Any suggestions on how to approach this is greatly appreciated!
Attached is a screenshot of my structure with my conditional formating working as required. You'll need to adjust acording to your structure, but I used a formula-based conditional formating, with the rule:
=COUNTA($B$2:B$2)=$A$1 //Where A1 contains the workweek I want to highlight
Entered into cells $B$3:$V$6. Of course, in your case you'd have to change it to something like:
=COUNTA($B$2:B$2)+41-3=$A$1
Since your work weeks start at 42 and you have 3 extra headings you dont want added on your sum (ACTUAL START, ACTUAL DURATION and PERCENT COMPLETE). Also the header for the work week has to be a numeric value, but you can play around this to get what you need. Let me know if you'd need further help.
You do not need to use the third row for your conditional formatting, if row 4 has legal excel dates. The WEEKNUM() formula gives you exactly what you need.
If your Dropdown Menu is in cell B2 and consists of numbers from 1-52 then this should work for your conditional formatting:
=$B$2=WEEKNUM(D$1)
See attached photo.
I'm relatively new to Excel and have to stitch together something. I'm having some trouble with conditional formatting.
What I'd like to do is, for each line, type in the date of request. The hidden column is just the date of request +21 days. For the heading records rec'd, I have it elsewhere with 1 and 0, and then a custom cell view in which [=1}"Yes";[=0]"No". When the "hidden" column date is in the past, I'd like to conditionally format the date of request to appear in red.
I've tried something like this: =IF($F$3
When the "hidden" column date is in the past, I'd like to conditionally format the date of request to appear in red
The hidden column is not required for conditional formatting as the calculation of 21 days can be done within the CF formula rule. Select Date of Request (assumed to be ColumnF) and HOME > Styles - Conditional Formatting, New Rule..., Use a formula to determine which cells to format and Format values where this formula is true::
=TODAY()>F1+21
Format..., select your choice of red, OK, OK.
However you also mention Records Rec'd? column (presumably H) and if the above formatting is not to apply when the corresponding row contains "Yes" (on its own) in that column, change the above formula to:
=AND(TODAY()>F1+21,H1<>"Yes")
The reference to columnH might be changeable to the source (1s or 0s) that trigger the Yes, depending on how the Yes and No are derived.
For simplicity the formatting rule has been applied to the entire column. If a shorter range is required select from H3:Hn (where n is the highest row number in the range) and adjust the formula from F1 to F3 and from H1 to H3, or don't adjust but set another rule for the first three rows that applies no formatting but takes precedence, or specifically exclude the first three rows within the formula.
IF is not normally required within a CF formatting rule (because such formatting is conditional).
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!