See how to apply Excel conditional formatting to dates. Learn how to use formulas to highlight weekends and holidays, format cells when a value is changed to a date, shade upcoming dates and delays, conditionally format dates based on the current date, and more. Continue reading
Comments page 30. Total comments: 1243
Hi!
I've got to create a spreadsheet and I'm totally overwhelmed!
I need to have future dates assigned to particular cells and I need to have those cells become highlighted a month before this date. Does that make sense and what would be the best way to do that?
Best,
M
Hi Margarita,
Supposing that your future dates are in column A and begin in cell A2, you can use the following formula:
=AND($A2-TODAY()>0, $A2-TODAY()<=30)
Hello,
I am having issues with a date formula. I have a spreadsheet with an end date of 5/1/2015 in C3. I then have dates in column B which need to be conditionally formatted to turn green, yellow, or red depending on how far they are from 5/1/15. For example, my date of 4/30/15 needs to be green (one business day prior), 4/29/15 needs to be yellow (2-3 business days prior), and 4/27/15 or before (more than 3 business days prior to date in C3) needs to be red. I hope this makes sense. Please let me know if you need more information - I have tried everything I can think of!
Hi,
One of the best and most clear examples i have come across. LOVE IT! straight forward and clear!
I do however struggle with the following.
*Start Date*
Confitional format for 3 - 6 months from start
Confitional format for 6 - 9 months from start
Confitional format for 9 - 12 months from start
Confitional format for 12 - 18 months from start
Confitional format for 18 - 24 months from start
Confitional format for 24 months from start
I have looked at your method for days but im unsure if this works the same for months.
would it make sense to calculate days separately to then use that (hidden colomn) to do conditional formatting??
Any advise appreciated.
Keep up the great work
Hi Alex,
Thank you so much for your kind words.
As for your task, you can use the Excel DATEDIF function to calculate the difference between the start date and other dates in months.
For example, a rule with the following formula will format dates that are 3 - 6 whole months after the start date, inclusive:
=AND(DATEDIF($A$1, $B2, "m")>=3, DATEDIF($A$1, $B2, "m")<=6)
Where A1 is the start date and B2 is the top-most cell in the column of dates you want to format.
Thank you soo much for the fast response and a solution.
been wrecking my brain for 3 days with this.
will respond back with the outcome.
I am trying to set up a task tracker with forecast and actual dates. A date that is forecasted and is past due should turn red. a date that is forecasted and only 7 days away should turn yellow and any actual dates should remain standard font. Please help!
Hi,
I can't get the different colours to work, but highlighting in one colour is still a massive help. Thank you so much!
Hi, Could you please help me!!
I am trying to make a spreadsheet to show the first contact with a company (in the C cells), the F cells show the date 42 days which is the first follow up appointment due (which is where I need the colour coding highlighting system to increase awareness of the date) and the third column (G3, etc) will be the date the follow up appointment is completed (which will mean I no longer need the highlighting assistance).
I currently have cells F3-F200 with the formula =IF(C3="","",C3+42) etc, to calculate the date 42 days on from the date in the C cells. I would like to put a conditional formatting formula on the F cells which tells me if the date is approaching. I would like it to be highlighted red if due within a week of the current date (and stay red if it goes past the date) and orange if it is due within 2 weeks of the current date. However, I would also like the highlighting to go away once the new date has been put in the column next to it (which will be G3-G200 - these cells have no formulas or data in them until).
Please help, I'm so stuck!!
Thanks :)
Hi Nicole,
Try the following rormulas:
Red: =AND($G3="", TODAY()-$F3<=7)
Orange: =AND($G3="", AND(TODAY()-$F3<=14, TODAY()-$F3>7))
Good afternoon,
I have a checklist spreadsheet that i am working on and need some assistance with conditional formatting. I have one column which has dates in it. I want to use an icon set for the following:
When the date is today or any future date I want the green icon.
When the date is within 14 days of today's date I want the icon to be orange - this needs to change and each day passes (a date 3 weeks from today would be green but as soon as it reaches the 14 days to go mark, I want it to turn to orange.
Any date that is before today's date would be red.
I can get the red and green to work but not the orange. Please help.
Thanks
Marc
Hi Marc,
The green and red icons are easy, please see the settings below. As for the orange one, sorry I cannot figure out a proper formula because relative cell references are not allowed for icon sets.
Hi, im stuck, just learning excel. How do you create a formula that shows how many days left til the end of the month. Am assuming I use a NOW function, just not sure how to do it.
Thankyou in advance. =)
Hi Karen,
You can use either formula:
=EOMONTH(TODAY(), 0)-TODAY()
or
=DATEDIF(TODAY(), EOMONTH(TODAY(), 0), "d")
To display the number of days, a cell with the formula should be in the General format.
You can find more about calculating dates in Excel in our Excel Date tutorial. For example, the following article explains the details of the EOMONTH function that returns the last day of the month:
https://www.ablebits.com/office-addins-blog/excel-month-eomonth-functions/#get-month-last-day
Hi
How to highlight all dates rows above a specific date.
e.g all rows above 1 January, 2019.
thanks
Hello Svetlana,
Can you please advise on my last question to you in post 116? Any help/suggestions would be greatly appreciated. And I can explain further if needs be.
Thanks in advance,
Leon
Hi Leon,
I am sorry I have very little experience with Google sheets. In Microsoft Excel, you could probably do this by using the VLOOKUP function (https://www.ablebits.com/office-addins-blog/excel-vlookup-tutorial/)
Though, I cannot state anything with confidence without seeing your data structure. If you could post this question on our forum and attach a sample Excel workbook for better understanding, our support team will do their best to help.
HI,
How can we highlight the data upto current month in conditional formats ..
Thank you in advance.
Hi Sai,
Assuming that your dates are in column A and row 2 is the first row with data, you can create a rule with the following formula:
=$A2<DATE(YEAR(TODAY()),MONTH(TODAY()),1)
Hello Svetlana,
Really hope you can help me.
I manage a spreadsheet (on Google Sheets), that lists booked on adverts that have specific copy deadlines for each ad. Each ad copy deadline is dependant on the section of the paper in which it appears. So, for example, for an ad appearing in Sport/Main News section deadline is always the day before. For an ad appearing in Weekend magazine, copy deadline is 10 days before, Review section, 4 days before and so on.I have separate columns for Section name, Publication Date, Copy deadline.
Is there a method or formula I could use that could automatically tell me the copy deadline of the ad, based on the section in which it appears and publication date? So if I enter the section name, and the publication date, the copy deadline will appear with the correct deadline date.
Thanks in advance.
i have a spreadsheet which i import data from a .csv file daily and run a report to show missed telephone calls. I want to highlight those times when the office is open but can't seem to get conditional formating to just look at the times. The format the date/time info is in is 15/05/2015 12:33, i just want to highlight the time if between certain times and not the date as this changes daily with each import. can onlt get the formatting if i include the date and time. Any suggestons? Thanks
Hello Mark,
Please select the Timestamp column and create a rule using this formula:
=AND( TIMEVALUE("10:10")<=(D2-INT(D2)),(D2-INT(D2))<=TIMEVALUE("17:00"))
Where D2 is the first cell in your selection
"10:10" – "17:00" is the time range that you want to highlight.
I am looking for a function that will tell me when my invoice dated 1/1/2015
is over 30, 60 or 90 days..
Hi Becky,
Assuming that your invoice date is in cell A2, you can use the following formulas:
Over 30 days: =TODAY()-$A2>30
Over 60 days: =TODAY()-$A2>60
Over 90 days: =TODAY()-$A2>90
Hi Svetlana Cheusheva ,
Could you pleas tell me how to highlight a cell (Say A1) if the cell value (Say B1) is of the last month date.
Thanks in advance.
Hi Abhishek,
Here's the formula:
=MONTH($B1)=MONTH(TODAY())-1
I have an excel sheet where I am highlighting completion dates with respect to current date. The formula am using is =AND($P6-TODAY()>=0,$P6-TODAY()<=7). Here P6 stores the cut-off date. However am also trying to match it with another criteria in column L6 which stores whether the job has been completed or is in-progress. All am looking to do here is if job completionYes and the completion date<=7 days from current date then such completion dates should be marked in RED.Pls help, thank you
I have tryed some of the above examples with no luck. I have a spread sheet with names in colum A and dates in colum C if the dates are more than 3 months old I want to highlight the names orange, and if the dates are 6 months or greater I want the names to be red. any help?
Thanks
Hi Chris,
Select the cells in column A you want to highlight (not including the column headers) and create the following rules:
Orange: =AND(TODAY()-$C2>90, TODAY()-$C2<180)
Red: =TODAY()-$C2>=180
Assuming that row 2 is your first row with data.
Please note, the formula operate on days, not months, because the number of days differ from month to month.
Hi Svetlana
Please can you help me, I make use of a spread sheet to monitor and track all certificates expiry’s for all of my employees, I would like the cells to automatically change colour if the date has expired + going to expire in 0-30 days, 0-60 days, 0-90 days.
Thanks so much.
Hi Etienne,
Assuming that your dates are in column A, you can use the following formulas:
Expired:=$A2<TODAY()
Expire in 0-30 days: =AND($A2-TODAY()>=0, $A2-TODAY()<=30)
Expire in 31-60 days: =AND($A2-TODAY()>30, $A2-TODAY()<=60)
Expire in 61-90 days: =AND($A2-TODAY()>60, $A2-TODAY()<=90)
we can calculate the no of day like =datedif(c11,d1"d")
now how we can calculated the number of months between 31/10/2012 to 31/03/2015
I have a large file that is used to track leased property. Out Leases run for 10 years with 2 10 year extensions. How can I highlight an entire row in red when the lease inception date is coming up on renewal? That is: inception date 1996, renewal is 2016. I don't need exact dates, years will work fine.
I have looked thru your article, but didn't see how to handle a ten year gap.
Thank you for your article and help.
Joe
I need a rule for column C that highlights the cell if the date is 6 months or more in the past.
Hi Dan,
In this case, you can operate on days, not months, because months have a different number on days.
For example the following formula highlights dates that are 180 days or more in the past:
=TODAY()-$C2>180
Hi,
I have an excel spreadsheet (2010) that I would like the date entered in a set cell to turn yellow within that cell three months before it's anniversary. Then to turn red on it's anniversary date.
Any help much apprecaited.
Thanks
Hi,
I need to check the Datetimestamp in an cell and condition format it with different color.
Eg:
Cell content will be in the below format ("22-MAR-15 23:15") ("DD-MON-RR hh:mm") format
Scenario:
o Green when process is complete by 3:00 CST/4:00 EST
o Yellow when process is complete after 3:00 CST/4:00 EST and before 4:00 CST/5:00 EST
o Red when process is complete after 4:00 CST/5:00 EST
Applies to the current date.
Can someone please help me on this.
Thanks
Hi Svetlana! Posted a comment previously, here are some changes to the question.
Here are some details of the matrix:
F1: Data Received Date
G1: Duration (Days excluding weekends)
H1:End Date (Days excluding weekends)
I1: Data Reviewed Date
G2: 3
H2: 4
What needs to be done is that: The date on F ( Data received) has to be added to the end date to calculate the deadline.
If the deadline is met and completed, the cells at I(Data Reveiwed Date) should turn green.
However, if the deadline is not met but it is still completed, it should turn yellow.
I am unable to get the appropriate formulas. Do help, thank you so much.
Hello, I have a .CSV file, which opens in Excel. In the spread sheet, column A is Subject and Column B is the Date. I want to use different colours in Column A (Subject), based on the value in column B (Date). What should be the formula. Thanks for understanding and cooperation.
Hi Svetlana,
I am creating a to do list to coordinate with the various items I have to complete by certain dates but I don't have the knowlege to make up the formula to return what I need.
For instance;
I will get a date or confirmation for a document to be filed and place that Date in A2.
What I need to be able to do is have some cells return a value of 'due within the 15 days prior' and some cells to return a value of 'due within the 15 days after'
I have a spread sheet with employee names and available certifications. The cells are marked with a check if the employee has the certificate. some certificates have expiration dates. I need a formula, for conditionally formatting the individual cells, that changes the color of the check mark when the certificate has expired.
Hi Svetlana,
I have a spreadsheet with date entry in range column (B10:B54) and I want that whenever Christmas date (24 Dec) and New year Date (31 Dec) comes irrespective of the year, both the date cells should get highlight.
Thanks in advance
Hi Navneet,
Try creating a rule for cells B10:B54 with this formula:
=AND(MONTH($B10)=12, OR(DAY($B10)=24, DAY($B10)=31))
You are genius. It worked. Thanks a lot.
I have task list with start and end dates. I'm trying to get Excel to be able to color fill the cells to the right of the dates based on the duration of the tasks.
For example, Task 1 starts 3/16/15 and ends 4/3/15. The columns to the right are the Fridays of each week (3/20, 3/27 etc). For task 1, how can I get Excel to color fill the cells for 3/20, 3/27 and 4/3 and then stop.
I tried Excel bar chart, but that didn't produce the intended results and requires a lot of reformatting. Thanks for any help you can provide.
Hi Tom,
You can do this by creating a rule based on the following formula:
=AND(C2>=$A2, C2<=$B2)
It assumes that row 2 is your first row with data, column A is the start date, B is the end date, and C is the left-most column with Fridays.
You need to apply this rule to all "Fridays columns", not including the column headers.
Hi! Okay so I've been given a matrix to complete and I AM STUCKED BECAUSE IM NEW WITH EXCEL.
So, What i have is a planned date (D5), Duration (G5) and End Date (H5) and what i need is the Reviewed date which is on (J5) Is there formula if i want the values at J5-J100 containing the date to turn red when it is completed but over due
And green is completed on time.
Hi Estelle,
If my understanding is correct, an item is considered over due if the Reviewed date (J5) is greater than End Date (H5). And you want to highlight only those cells that have a Reviewed date set (empty cells in column J are not highlighted).
If so, then all you need is create a rule for cells J5-J100 with the following formula:
=AND($J5<>"", $J5>$H5)
I have a spreadsheet with titles from A1:G1, and data from A2:G283
In column G i have drop downs with Yes or No options.
I would like a conditional format which will highlight the rows (e.g from a2:g2) in red which have "no" in the G cell at the end of that row, and Green if "yes".
What can I use for this?
Thanks!
Hi Tomocon,
Simply select all the rows you want to highlight (without the titles) and create 2 rules with the following formulas:
Red: =G2="no"
Green: =G2="yes"
Hi Svetlana,
This seems to only highlight the first cell of the row. not the whole row.
There seems to be a problem with cell references. Try this formula:
=COUNTIF($C4:$G4, 0)>=4
And make sure the rules applies to B4:H4 (you can actually include more than one row if needed).
The row will be highlighted in there are 4 or more zeros in C4:G4, in any cells, don't know how to limit it to consecutive cells only :(
Thanks Svetlana for the quick reply!
In relation to my first question, the formula you suggested, will only highlight the first cell in the selected row.
even though i have selected the whole row and made the conditional format on this?
Any ideas on why?
Thanks Tom
Hi Tom,
Oops, my bad. I mentioned incorrect cell references in my formulas but forgot to fix them. Sorry!
In the formulas, please fix the column using the absolute reference (with the $ sign):
Red: =$G2="no"
Green: =$G2="yes"
Hi Svetlana, Back again!
I have a sheet, which has a data validation in Column I.
I want to hide a row, If i select "Fully Sent" in this validation on that row.
Any VBA codes i have found have hidden the entire range when I select "Fully Sent" in one row. I need this to only hide the row where "Fully Sent" is selected.
Any ideas?
Data validation in Column I
Rows 4:92
Other validation options "complete" "Pending"
Thanks :)
Thanks Svetlana!
No worries at all! ... if you ever figure out the consecutive number issue please email me! thanks!
Thanks Svetlana!
So simple! I feel stupid!
I have another one, I'm drawing a blank on how to do!
I have a basic attendance sheet, for a weekly meeting.
I would like to highlight a row of people who have not been present for 4 or more consecutive weeks.
So highlight B4:H4 if "0" shows 4 or more consecutive times in C4:G4
Thanks ! :)
What would be a formula for the following example. I keep a spreadsheet with our data tapes that go offsite. After two weeks they expire and I need to request them back. The tape number is in column A, while the expiration date is in column D. I need to check column D and if it is equal to today's date, I need the tape number in column A to be copied to another worksheet. I have about 15 tabs I need to check every morning and thought this could be automated somehow. Thanks.
Hello...I am having problems with formulas in columns. I tried conditional formatting and it isn't helping.
I need a column to calculate the dates from 1 year forward and color coordinated to go from green to yellow to red the closer it gets to the deadline of 30 days and automatically update when I enter a date in the column to track the deadline dates...
I want to create a conditional format that highlights any time that is less that 7:00:00 AM using AM/PM time. Any advice you can give me would be appreciated.
oops. I just added my email. sorry
Hi Sandra,
No problem :) Assuming that your date is in column C, and row 2 is your first row with data, select all the rows you want to highlight (without the column headers!) and create a rule with the following formula:
=$C2<DATEVALUE("6/30/2015")
Hi, This should be simple enough but I'm a beginner. Can you please tell me how to highlight rows if the date in column 3 is any date before 6/30/2015. Thank you! Non-Employee Info 2/23/2015 6/30/2015 503441
Non-Employee Info 3/1/2015 6/30/2015 512294
Non-Employee Info 1/1/2015 3/5/2015 512237
Hi how about instead of calculating the due date based on date, can you give an example based on time? like if the due time is 8:00?
i m trying to calculate the difference between dates
1st cell = 2015 February 9 01:07:13 UTC+5:30
2nd cell = 2015 February 9 01:07:47 UTC+5:30
2ND - 1ST
pls can someone help me regarding that
hi pls help me to highlight or to put icon to column N where i can identify data verified within TAT based on Column K (TAT date)..i only can put to a single cell how to do for entire column...bcos tat date is not same...tq pls advice me
column K Column N
tat date verified date
22/01/2015 23/01/2015
23/01/2015 21/01/2015
23/01/2015 22/01/2015
How to find total working day in a month including Saturday
exp:may-2015, PH- 1day sunday 5 dyas, net working days 24 dys
my question is first cell old date, second cell today date and third cell may be work completed or work in progress or work pending. but my condition, if third cell value is work in pending that time i need to subtract from second cell to first cell i need how many days work pending
please help me for my daily activity works.
thanking you,
regarding
ranjith
hi ...
can i vary content of entire column using universal formula based on contents of another column ???
waiting for reply
yes
PLEASE HELP ME IN THIS ISSUE
01-07-2013 A1
01-10-2013 A2
14-12-2013 A3
01-10-2014 A4
17-10-2014 A5
01-03-2015 A6
Now I want to fill like this automatically below cells D4 and E4:
D4 E4
01-07-2013 31-07-2013
01-08-2013 31-08-2013
01-09-2013 30-09-2013
01-10-2013 31-10-2013
01-11-2013 30-11-2013
01-12-2013 13-12-2013
14-12-2013 31-12-2013
01-01-2014 31-01-2014
01-02-2014 28-02-2014
01-03-2014 31-03-2014
01-04-2014 30-04-2014
01-05-2014 31-05-2014
01-06-2014 30-06-2014
01-07-2014 31-07-2014
01-08-2014 31-08-2014
01-09-2014 30-09-2014
01-10-2014 16-10-2013
17-10-2013 31-10-2013
01-11-2014 30-11-2014
01-12-2014 31-12-2014
01-01-2015 31-01-2015
01-02-2015 28-02-2015
01-03-2015 31-03-2015
HI, FRIENDS I AM SUBMITTING MY PROBLEM LIKE THIS.
DATE PAY Rs.
A1: 13-07-2014 15000
A2: 17-10-2014 17000
A3: 01-12-2014 19000
ABOVE SERIES IS TO MAKE SALARY BILLS IN FRACTION OF A MONTH AND
Now I want to fill like this automatically below cells D4 and E4:
D4 CELL E4 CELL PAY Rs.
13-07-2014 31-07-2014 15000
01-08-2014 31-08-2014 15000
01-09-2014 30-09-2014 15000
01-10-2014 16-10-2014 7742 ( FOR 16 DAYS @15000 P/M)
17-10-2014 31-10-2014 8226 ( FOR 15 DAYS @17000 P/M)
01-11-2014 30-11-2014 17000
01-12-2014 31-12-2014 19000
D4 IS ALWAYS FIRST OF THE MONTH UNTIL FRACTION COMES AND E4 IS ALWAYS END OF THE
I NEED HELP!!! Trying to get cells to fill different colors based on date in cell for yearly (annual)certification.
Example....cell E3 date is 1-JAN-15,
**no action needed (green fill)1-JAN-15 to 1-OCT-15
**must complete training in next 90 days(yellow fill)1-OCT-15 to 31-DEC-15
**expired(red fill) 1-JAN-16 or after
So if they completed cert on 1 APR 14...the cell should be yellow right now bc it is due to expire in the next 90 days.
If they completed cert on 1 FEB 14 cell should be red bc it is past 1 yr.
If they completed cert on 1 DEC 14 cell should be green bc they have 9months before the 90day window.
Any help is GREATLY appreciated!!!
Can some on please help me with this. thanks in advance.
some cells in Column C have dates. I want to put a conditional format formula which will highlight the same line cell number in column E if there is any date in Column C.
for example
C2 has a date, then E2 becomes yellow
C3 doesn't have date, E3 remain clear
C4 has a date, then E2 becomes yellow
and so forth
hello! so I have a column were the names of certain permits are, and another for the date it was issued and another for the date of expiry. I want to have my cells with the names turn orange when there's only 2 months before it expires and green if it is still far from expiring, red when it has already expired. Thank you!!!
Hello Lyka,
Select your column with the names and create 3 conditional formatting rules using the following formulas:
Red:
=AND(C2<>"",$C2
I am trying to highlight the days between start date and end date for a given task. tried conditional formatting does not work.
I tried to just high light holidays. in one worksheet Match works, the same formula does not work else where strange.
Can someone help in excel, how to go about this.
Hello Raj,
It's difficult to advise anything without seeing your data. If you can post your sample workbook on our forums and describe what data you want to highlight, our support team will try to help.
Hi,
I have a date a document was sent out in A1 when it is returned I will fill the date in B1. If B1 is blank and there has been more than 28 days since A1 I want it red, how do I do this please?
egA1 01/01/2015
A2 Blank but todays date is 01/02/2015 so its more than 28 days since A1
Thank you
Hi,
How to set Mandatory Field in Excel.
Eg.
Column A Column B
-------------------------
Name (A1) (B1)
Emp No.(A2) (B2)
Address (A3) (B3)
Here I want to set mandatory cell for (B1). need message box if there is no text on that cell. Please help me.
Hi,in my spreadsheet where i want to apply formula in following way please help me
in E5 cell i have expiry date. But i want 30 days before from the expiry date in E5, cell turn into RED color otherwise remain Green
Example expiry date in E5 is 30 April 2015 till 31st March E5 remains Green but as 1st april arrives my E5 turn into RED
BEST REGARDS
I have a weekly time and accounts sheet that I would like to apply some conditional formatting too.
Our working day starts and finishes at Midday. I would like to use the today function for automation purposes, is it possible to use the today function + time?
What I would like to do if the above could be used is
(Todays Date is merged across cells A1, B1 and C1)
Highlight Cells A2:C10 if cell A1 (A1:C1) = TODAY + 12 Hours
Many thanks in advance
Rob Ward