Categorising by date in Excel 2010 - excel

How can I format Excel to read the date in a cell (A), compare that against dates in other cells (B,C,D etc), and if A is a date before B, highlight row in a particular colour; if A is a date before C, highlight row in a particular colour etc.
Example:
A is 15/11/2014
B is 07/11/2014 (Green)
C is 14/11/2014 (Red)
D is 21/11/2014 (Blue)
Based on this, the row should be Blue as it is before D.

You are going to want to look at Conditional formatting. Under the Home Tab, in the Styles Group, click Conditional Formatting. You can set up the rule (format by value probably). One way to do it is to add multiple rules (one for before red date, one for before blue date, etc.) and then check the box for stop if true for each one.
In the example you provided, first rule would be: if A < B then format green. Second rule: if A < C then format Red. Third rule: if a < D then format Blue. There's also an option to do multiple ranges in one rule (depending on your version of Excel). That would probably be simpler. You should be able to use relative (A1 instead of $A$1) references for your equations, so that when you use the format painter to paint the entire column the comparison formula travels with it. For more detailed information on Conditional Formatting:
https://support.office.com/en-US/Article/Quick-start-Apply-conditional-formatting-6b6f7c2a-5d62-45a1-8f67-584a76776d67?ui=en-US&rs=en-US&ad=US
Does that help?

Related

Excel; Conditional formatting Date/Time between two columns

I have two columns, for example Column A and B with the below style of set up.
What I am wanting to do is to highlight both columns in a colour based on certain parameters.
For example: If Column B is due to occur AFTER Column A - no colour. If Column B is due to occur at the SAME TIME as Column A - Highlight both cells in yellow. If Column B is due to occur BEFORE Column A - Highlight in Red.
Please see below examples of the kind of data I would be working with, and then below it an example of what it would look like should the conditional formatting colour it in correctly.
Thank you.
Base Data
Completed Formatting
OK, figured out that 1800LT = 1800 hours, Local Time(?)
You will need to create two conditional formatting rules. One for each of your conditions.
Conditional formatting > Manage Rules... > New Rule... > Use a formula to determine which cells to format.
Rule 1, set color to Red:
=IF($B1<$A1,TRUE,FALSE)
Rule 2, set color to Yellow:
=IF($A1=$B1,TRUE,FALSE)

Excel Conditional formatting whole table color code

I would like to create a condition for my whole table.
I have three categories (i.e R, G, B).
If the first column (example: A1) is R, the rest of the ROW (ex: B1:E1) should be colored with red. If G, then green, and if B, then Blue.
What I've done so far is I've selected my work area which is B1:E1, then clicked on conditional formatting > new rule > "Use a formula to determine which cell to format" (I'm using excel 2010). Then Typed this at the formula bar =SEARCH("R", $A$1)>0. It does change the color of B1:E1, however, I don't know how to do this for my whole table. If I select my whole table, and A1 is equal to R or G or B, the whole table change its color to whatever the value of A1. I also change my formula to =SEARCH("R", $A$1:$A$120)>0 which is the range of my table, still doesn't work. I've also created 3 conditions for each color with same formula (I just changed the letter R to G and B), still does not work.
Any ideas? Thank you in advance.
you were actually pretty close, just change
=SEARCH("R", $A$1)>0
to
=SEARCH("R", $A1)>0
so the conditional formatting rule will always look for "R" in the current row rather than row 1.
You should have this rule apply to the whole range that may be colored (I'm guessing B1:E120)
Also, you can make two rules for your other colors using the same approach.

Trouble with Conditional Formatting Date + Other Conditions

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).

IF statement based on dates

I have an Excel sheet that shows a Target date in one column and the next column has the Actual date. I have added statements to turn the Target date to RED, GREEN or YELLOW.
How do I turn the Target date column back to white after a date is added to the Actual date column?
If the colours are added by Conditional Formatting it may be best to incorporate the "back to white" requirement into whatever rules you are using but you can use Conditional Formatting to apply a rule such as:
=ISBLANK(B1)
with white colour - assuming (a) the Target dates are in ColumnA (b) the Actual Dates in ColumnB and (c) the range you apply this to is either =$A:$A or as relevant (or you select the range before setting the rule).
If necessary move this rule to the top and check Stop If True.

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