I am trying to format an excel document using conditional formatting
if cell is less than 1035 days from todays date make green
if cell is between 1036 days and 1095 days date make orange
if cell is more than 1095 from todays date make red
What formulas would I need?
Thanks
Say your dates start in B1 and go to B100.
Select B1, then select conditional formatting - New Rule - Use a formula to determine which cells to format.
For the highlight green example formula, use:
=DATEDIF($B1,NOW(),"d")<1035
Hit the format... button and fill to corresponding color.
Hit "OK"
Then in the manage rules menu, in the Applies To column, enter the range of cells you want that to apply to. i.e. =$B$1:$B$100
For the highlight orange example formula, use:
=AND(DATEDIF($B1,NOW(),"d")>1035,DATEDIF($B1,NOW(),"d")<1095)
For highlight red example formula, use:
=DATEDIF($B1,NOW(),"d")>1095
Related
I have a hourly plan where time of employees' meetings automatically appears from an other sheet.
I need it to be marked with specific color according to meeting's lenght.
Ex.
"A1=0,5 then A1 is blue
if A1=1 then A1 and A2 is blue
if A1=1,5 then A1, A2, A3 is blue and etc."
I only find info how to mark specific cell using conditional formating or VBA, but don't know how to apply formula to the whole table
Conditional Formatting
Select the range where you want this applied, e.g. A1:A10, or A1:J10 if you want this to work in the other columns, too.
On the Home tab select Conditional Formatting > New Rule.
In the New Formatting window select Use formula to determine which cells to format.
In the text box below enter this formula:
=A$1/0.5>=ROW()
Press the Format button below and in the Format Cells window select the Fill tab. Select a color and press Ok 3 times.
i'm newbie in excel and i have an excel sheet where i need to change the cell color if the date mentioned in the cell is becomes 15 days old and also add a status in next column as pending.Please help with this.
Assuming your dates are in ColumnA, please select that column 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()-A1>=15
Format..., select your choice of colour for formatting, OK, OK.
If the "pending" labels re then to be added in ColumnB where appropriate please put in B1 and copy down to suit:
=IF(TODAY()-A5>=15,"pending","")
You could use the pending in ColumnB to trigger the colour for ColumnA but it may be better to keep the two requirements separate. If you were to trigger via 'pending' you would still need a formula rule, rather than a "cell content" one.
Change 15 to 20 when you have decided what the interval should be. Beware that if your ColumnA values include times (even if not displayed) you cannot reliably simplify >=15 to >14.
This is the formula you might be looking for:
=IF(DAYS(TODAY(),A1)>=15,"pending",other_status_you_use)
Then you should go to
Conditional Formatting > Highlight Cell Rules > Text that Contains...
There you can type pending and change the color as you wish.
I am trying to compare pages of employee hours verses sales. In order to catch myself if I record sales and not hours, I'd like the hours cell for a given date to highlight itself, if the sales cell has a value.
Here's an example of the "hours" sheet:
2-Nov 3-Nov 4-Nov
Smith Judy 0.8 7.25 0
And an example of the "totals" sheet:
2-Nov 3-Nov 4-Nov
Smith Judy $15.72 $76.55 $82.13
The problem would be that Judy is listed as selling $82.13 (E2) in product, while having worked 0 hours (E2) according to the "hours" sheet.
Is there a conditional formatting formula that I can use to get Excel to highlight the "0" listed under 4-Nov on "Hours"?
Is there a conditional formatting formula that I can use to get Excel to highlight the "0" listed under 4-Nov on "Hours"?
Yes. If you want to highlight the "0" on the "Hours" sheet, you can use conditional formatting where the formula includes a reference to a cell on a different sheet.
For example, click on the Hours sheet cell E2. Go to Conditional Formatting -> New Rule -> Use a Formula to Determine Which Cells to Format and paste a formula in the "Format values where this formula is true:" box there, like:
And(E2>0,totals!E2 =0)
Then click the Format button below it on the right, activate the Fill tab, and click what color you want the cell to be highlighted in.
Thanks to Scott Craner's comment on the question for providing an improved formula.
Rather than just formatting a singe cell, I suggest selecting all the relevant columns in hours (presumably starting with C) 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(OR(C1="",C1=0),NOT(ISBLANK(totals!C1)),NOT(ISBLANK($B2)))
Format..., select your choice of highlighting OK, OK.
This warns even when blank rather than 0 in hours but relies on names such as Judy to avoid extending to empty rows. It also allows for values in totals of nil or negative (in case of adjustments).
I am trying to do conditional formatting on the below example.
I would like to highlight certain columns/cells based on the day of the week. For example, if the date is a Tuesday, then I would like the WeHo, Sunset, WW, MB, Irvine, BrentW, Cienega and Hun B columns highlighted. If possible I would like to base the day of the week off the pre-existing date in cell A2, since we do our work one day before hand (working on a Monday, but cells are highlighted as if the actual date was Tuesday).
Assuming that the date in A2 is a Monday and you want B2:B20, E2:E20, J2:K20, Q2:Q20 and T2:U20 to be formatted then please select those ranges (with Ctrl depressed) and HOME > Styles - Conditional Formatting, New Rule..., Use a formula to determine which cells to format and Format values where this formula is true::
=WEEKDAY($A$2)=2
Format..., select your choice of formatting, OK, OK.
Sounds like you want to use formula conditional formatting. Basically, go to the formula conditional formatting and =$A$2="Tuesday" then click ok and make the "apply to" apply to the column you want highlighted when A2 says it's a Tuesday.
I am trying to set up two conditional formatting rules:
One in which when cell B3 is empty, the corresponding cell (J3) stays its current color.
The second rule is when a date that is put in cell B3 that is 90 days or more from today's date, the corresponding cell (J3) turns red.
Can someone help please?
Please select J3 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(ABS(B3-TODAY())>89,B3<>"")
Format... with red formatting, OK, OK.
Note this assumes the formatting in J3 is not set by Conditional Formatting when B3 is blank and that "90 days or more from today's date" is either earlier or later than today.