Conditional Formatting Rows Based on Date - excel

I have a table with a round 500 rows of data. I want to setup conditional formatting to highlight rows based upon how old a row is (based upon the date cell in that row). The idea is that as an entry get's older, it is entered with a white background, but as it ages, it turns a darker shade of red. We have data taken from 5 separate weeks and plan to add more. Is this POSSIBLE in Excel, or will I need to highlight each week manually?

If you are willing to have one column be highlighted, as opposed to the entire row, this example should help.
Steps to reproduce:
Highlight the column with the dates
In the Conditional Formatting menu (Under the Home Tab on the Ribbon - Office 2013)
New Rule
Format All Cells based on their values.
Choose the darkest color for the Lowest Value
Choose the lightest color for the Highest Value
OK
Note in the example below how the scale of the colors changes based on the range. When the lowest date is 2001, that receives the darkest red, but when a date from 1980 is entered, the dates from 2001 and up are considered to be in the lighter third.
The formatting applies to the entire column, so you can add as many dates as you need.
Here are some very useful tips demonstrating a number of uses for conditional formatting:
Excel formulas for conditional formatting based on another cell value
How to conditionally format dates and time in Excel - built-in rules and formulas

Related

Excel Conditional Formatting - Highlight blank cells between

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.

Excel Conditional Formatting, based on difference of 2 cell calculation

I've been trying to create a conditional formatting based on calculation of 2 cell.
The logic is, if the current month increases/decreases more than x or -x from previous month, then it will highlight or change or even better if I can use icon to show it.
So for example, for the month of march, since it decreases more than 2pts, than the cell should turn red. And for the month of Feb, since it increases by 2pts, then the cell should turn green.
Is there any way to do this? and Copy Paste this through the table?
you could use the following formulas for conditional formatting starting in feb:
=(b2-a2)>2 set the format to fill in green
=(b2-a2)<2 set the format to fill in red
and then use format painter to copy that formatting for the other cells.

Copy conditional formatting to other columns on a spreadsheet that are not grouped together

I have created conditional formatting in a date column to show red if it's expired, orange if it's 30 days out from expiring. My boss now wants me to apply this to every register/database that exists. Problem is that some of the worksheets have multiple date columns and are not one after the other.
I haven't worked out how to copy and/or past the conditional formatting to the other date columns on the worksheets without redoing the conditional formatting from scratch.
Any solutions?
Assuming this is for Excel and you are dealing with entire columns then I suggest starting again (so we know what formulae are in use and that the Applies to range is a complete column) with, say for ColumnA, HOME > Styles - Conditional Formatting, New Rule..., Use a formula to determine which cells to format and Format values where this formula is true::
=AND(A1<>"",A1<TODAY()+30)
Format..., select orange, OK, OK.
Then repeat for red with:
=AND(A1<>"",A1<TODAY())
If these suit for ColumnA you should then be able to pick any one of the conditionally formatted cells, click Format Painter then, select whichever other columns you wish the rules to apply to.
Note that the order in which these rules are applied is significant. In Conditional Formatting Rules Manager red should be above orange (their order may be changed with the up/down arrows) and I'd suggest for red checking Stop If True).

Conditional formatting using dates

I have data like this:
In one sheet I have a table A with dates (ascending order) and account balances.
In another table B, I want to retrieve the balance on the last day of the month.
Now, I want to set the font color to white if the the latest date in table A is smaller than the corresponding date in table B.
See screenshot below, I want the marked area to be white (June 2014 and later). I think this can be done with conditional formatting.
Someone knows?
Starting in A19, select the cells in the row. Create a new conditional format based on a formula
=DATE(YEAR(A16),MONTH(A16),1)>MAX($C$1:$C$13)
Format the text white for this rule.

column shading by date range

I have a spreadsheet that has various rows filled in colours while the columns are set to months in text form - 'mmm'
what I want to do is format the sheet so the column that is the current month is shaded - for example - March - to show it is the current month. This will change as we move into April etc etc
I only want Current Month column to be shaded but I need to keep my original 'filled rows' as shown in the below screen example as they highlight other important info.
example sheet:-
Can anyone point me in the correct direction?
All advice very welcomed.
I am using Excel 2011 for Mac.
my hoped for result is something along the lines of the below:
Here's another Conditional Formatting formula that works with your setup. Add this formatting rule from A2 to L22 in your case:
=LOWER(A$1)= LOWER(TEXT(NOW(),"MMM"))
Note that the conditional formatting with override your row colors.
You can do this very easily with conditional formatting.
Suppose all your dates are in column E, you could do a conditional formatting rule such as:
=MONTH($E1) = MONTH(NOW())
Set it to all the data you want highlighted and then just choose the fill color you want.
Hope this helps.
If you insert a second row (it can be hidden) with month number (A2 = 1, B2=2, etc) then you can apply the following conditional format
=month(now())=A$2
and then apply formatting as you like.
You need to make sure that this applies to the entire range.

Resources