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 5. Total comments: 1245
Probably a long shot but I'll ask! I'm using a =NOW() function to track the time elapsed, basically like a stop watch/stop the clock tracked in a spreadsheet of values. Currently formatted with =TEXT(CurrentTime-C10,"hh:mm:ss"). Two part question: The biggest question though is, is there a way to highlight the cell once 10 minutes, 20 minutes, or 30 minutes have elapsed without using a macro? I've tried using the time formatting and the lowest you can get is by day, not by minutes.
part two: This sheet is used by both US/UK employees, so one side sees it displayed in each time zone, but when dates are entered, it only tracks in the UK time frame. (Example: Time input in UK BST as: 10:13, elapsed time should be 11:08 (which is what UK employees see), but US employees see 19:11:08, based on the time zone and the =NOW. Is there anyway to format that better?
Hello! If you write the time as an unchangeable timestamp, you can apply conditional formatting to these cells using a formula:
=AND(C1<>"",(NOW()-INT(NOW())-C1)>TIME(0,30,0))
I recommend these guides on how to write the time in a cell: How to insert current time in Excel: timestamp shortcut, formula, VBA and How to insert today date & current time as unchangeable time stamp.
If I understand the second question correctly, you may find this tutorial helpful: How to create a custom Excel date format for another locale.
I hope it’ll be helpful.
Thank you so much for your quick response, I will give both these guides a look and try your formula!
I have a worksheet that tracks client due dates in multiple columns, with some due in seven days, some in 14, some in 30, and some in 90 (all the same range inside the column). I plan to enter the date that the variable is completed in the cell, and want the cell to highlight if it is so many days past the cell value. How do I do that?
Hi! Pay attention to the "Example 3. Highlight upcoming dates and delays" in the article above. It covers your case completely.
I am tracking attendance and I want to show a two year rolling date range. Meaning after two years the absence is no longer in their file. Once the absence is "out of range" I want it to no longer be on the spreadsheet. Additionally I want the recent 12 months one color and the subsequent 12 months a different. How do I format that?
Hi! To highlight dates greater than 12 months from the current date, you can use the conditional formatting formula with the DATEDIF function
For example,
=DATEDIF(A1,TODAY(),"m")>12
You cannot use Excel formulas to delete any data from the worksheet. You can do it manually or with a VBA macro. You can use an Excel filter to hide unnecessary data.
Trying to format a spreadsheet - work in doctors surgery.
Spreadsheet contains name, nhs no, date of death, date of birth, age and 6 other columns - I want to highlight a row based on the date of death being in the past month but whatever I use either highlights only the date of death cell or the whole spreadsheet.
Help please
Hi! Highlight rows starting from row 2 and below as needed. Create a conditional formatting rule for the selected rows using a formula:
=MONTH(TODAY())-MONTH($C2)=1
You can learn more about change the row color based on cell value in Excel in this article on our blog.
I've tried several things above, but conditional formatting just isn't working like I want it to. I have a spreadsheet with Month Names across the top. I randomly put numbers (not dates) in the rows below. What I want to accomplish is highlighting the current month column all the way down. So since TODAY is in May, I want to highlight the May column in, say, green and leave all the rest of the columns white. Once it turns to June, I want June highlighted all the way down. Is there a way to do this with conditional formatting? I've tried using the something like =Text(Today(), "mmmm") = B$1 (and vice-versa =B$1 = Text(Today(), "mmmm"). No formatting happens. Any ideas for me??
April May June July
$28.89 $20.15
$30.85 $30.85
$29.60
Hi! If your data are in columns A through L, for example, the conditional formatting formula should refer to the top left cell of the range and look like this:
=TEXT(TODAY(), "mmmm") = A$1
You can use these recommendations for the column: How to change the row color based on a cell value in Excel
Hi Alexander, I am trying to do a conditional color formatting for Scheduled End Date vs Actual End Date so if the Actual End Date is after the Scheduled by so many days it will be a variant of red. If the Actual End Date = or G8,-DATEDIF(G8,E8,"d"),DATEDIF(E8,G8,"d")) E8 is Scheduled End Date and G8 is Actual End Date.
Thank you so much.
Hi! If I understand your task correctly, pay attention to the following paragraph of the article above: How to highlight dates within a date range.
For example, =(G8-E8)>30
Hi. Thank you for your assistance.
=AND(TODAY()-$Z2>=305, TODAY()-$Z2<=365) returns an error. Please assist.
Hi. I can't check your formula because I don't have your data.
Check the value of Z2.
Dear Sir,
I have 2 issues.
1. Have XLs in which 3 colums idicate date of completion, how I can highlight earloest date in each raw?
2. In next column next action date written.
I want to compare it with above earliest date and if it is late , how can I highlight that cells?
Hi! Find the minimum value in column A using the MIN function. For column B, try the conditional formatting formula:
=AND(B1>A1,A1=MIN($A$1:$A$10))
Hi Alex,
It would so helpful if you could help me in sorting out the steps
A2= "=Today()" for ex. we can take it has 4/29/2023
B2(Start date) = 4/25/2023
C2(End Date) = 4/29/2023
D2 = I need to validate the formula which is
IF(A2= B2, it should "Delivering",
IF(A2> C2,"Completed")))),
Here am not getting the status as completed when date(C2) is actually completed
Hi! Combine these two conditions into one formula using these guidelines: Nested IF in Excel – formula with multiple conditions.
You all are so helpful! I am trying to create a spreadsheet to show past dates (completed) in green and today and future dates (not completed) in yellow. I currently have the following formatting: cell contains a blank value -no fill, =$G2>TODAY() -yellow fill, =$G2<TODAY() -green fill. The rules are in this order.
The blanks are correct, however anything I type a date in, regardless past or future, it fills in green. Any suggestions?
Hi! Unfortunately, I cannot check how you created the conditional formatting in your workbook. Note that the conditional formatting formula must match the conditional formatting range. In your case, the conditional formatting range should start on row 2. All the necessary information is in the article above.
I would like to create a yearly calendar (2023) month by month. I have completed this on my own manually, however, it took a long time. I am wondering if you have a template?
Hello! Your personal drop-down calendar and date calculator is Excel Date Picker. It is available as a part of our Ultimate Suite for Excel that you can install in a trial mode and check how it works for free.
Hi,
I have a spreadsheet which records 2 different types of inspection date. Inspection 1 and Inspection 2, i would like a formula to automatically create the next inspection date which will be in 3 years time, on a week day, based on whichever inspection date was the latest,
Can this be done?
Thanks,
I am hoping you can help with a formula.
In column A, I have a date in which an account entered a work queue. In column L I have different statuses in a list. I want the status to automatically change to "Proceed with Write-off - Status Unchanged" if the account has remained unworked for 14 days.
Also, the statuses are pulling from another spreadsheet in this workbook "Column Options" and are located in Q2-Q7.
Hi! Without having your data, it is impossible to offer you a formula. To change the status after comparing dates, use these instructions: Excel IF between two dates. I hope it’ll be helpful.
Hi there,
Hope you can help.
I have a dynamic calendar excel template with drop down list of months. Need to highlight certain days of a particular months, but it keeps highlighting those same days across all months. How do I break the link so that it highlights what I choose in a month, not same day in every month?
Hope I am making sense.
Thanks,
Hi!
I can help with Excel formula. But can't help setting up a dynamic calendar, which I don't have.
I have a spread sheet that already has the autodate generated in cells A2 and A27. Now I'd like to have the deposit numbers in cell B1 and B26 increase by 2 digits automatically when the document opens just like the autdate. For example, let's say my deposit numbers for today April 13, 2023 are K105 (B1) and K108 (B26). I'd like to open the spreadsheet tomorrow, have the current date along with cells B1 and B26 showing K107 and K110, the day's deposit numbers.
Kindest Regards
Hi!
If I got you right, the formula below will help you with your task:
="K"&(105+(TODAY()-DATE(2023,4,13))*2)
Hi.
Please could you help with the following conditional formatting formula?
I have 2 columns.
Column D is headed 'Response Required By'. This column contains a date that I need a response from a supplier by.
Column E is headed ' Response Received'. This column remains blank until the supplier's response is received and the date is entered manually.
The conditional formatting I am trying to apply is as follows:
If the supplier has not responded within 5 days of the 'Response Required By' date (column D), then I want to highlight the blank cell in column E as AMBER
If the supplier has not responded within 1 day of the 'Response Required By' date (column D), then I want to highlight the blank cell in column E as RED
When the supplier has responded and their response date is entered manually into column E, I want the cell in Column E to be highlighted in GREEN
Many thanks
Have you tried the ways described in this blog post? If they weren't effective, please provide me with more details about your task.
So I work at a prison and have a worksheet that tracks dates for inmate reviews based on the date they entered our unit. They need to be reviewed once every 7 days for the first 2 months, then once per month after that (this part I have covered). We have our meetings to review on Tuesdays and Fridays. So the review periods go from Friday-Monday and from Tuesday-Thursday. So for this week the dates for review periods would be 04/07/23-04/10/23 and 04/11/23-04/13/23. Do you know how to have dates that fall into these review periods automatically highlighted as we are in them and when they will be the next review period. Thanks! :)
Hi!
I'm not quite sure what dates you want to be highlighted. The dates you specified are the entire week of 04/07/23 to 04/13/23. Please describe your problem in more detail.
OK. The dates I provided are just an example using the current week. I need dates that fall on Fridays-Mondays and Tuesdays-Thursdays separately highlighted, but also only highlighted when we are within that timeframe and when they will be the next period. So for example, today is Wednesday the 12th, so we would currently be in the Tuesday-Thursday period. So I would want any dates appearing in that period to be highlighted (in say green). And the next period would be Friday-Monday starting on the 14th. I would want dates that fall into that next period highlighted differently (say orange) to let me easily see that they are upcoming. Once we reach Friday, then the Friday-Monday period would then be green and the upcoming Tuesday-Thursday period would be orange. And so on.
Hi!
A conditional formatting formula to highlight the days Tuesday through Thursday:
=AND(WEEKDAY(A1,12)<4,ABS(TODAY()-A1)<3)
You can learn more about WEEKDAY function in Excel in this article on our blog.
Hello,
I am trying to format a cell once a date has expired. Specifically, on 10/1/2023 I need every date that was entered in a column, that has passed to change format. However, I am trying to avoid just writing a new conditional format rule on 10/1/2023. Instead I would prefer the formatting indicate what has passed. Also I would like to keep it moving forward for the end of each fiscal year.
Hi!
You can see all the possible ways for conditional date formatting above. You can use a reference to the cell with the desired date in the formula so that you don't have to change the formula manually.
Hi,
I am trying to set up a sheet with conditional formatting. Ex. B4 has a target date with B3 being -7 days and B5 being +7 days. I want B6 to turn green if it is between those two dates. I know how to do this for one cell, but I need to do it for C-P as well. Is there a way to do this?
Hi!
Select a range of cells (eg B6:P6) and apply your conditional formatting rule to it. Read more in this guide: Relative and absolute cell references in Excel conditional formatting.
Hi,
I hope you can assist. I am trying to create a rule that will highlight and strike through the cells value if another cells date displays a date of the 22nd day or before.
For example
if C1 is filled with 9/23/2023 the target cell will be unchanged
if C1 is filled with 9/21/2023 the target cell will turn red with text strike through.
The date in C1 will constantly be changing ranging from 1930's to current.
Hi!
Use the DAY function to determine the day of the month from a date. Create a conditional formatting rule for dates with this formula.
=DAY(C1)<23
Hi! Hoping you can help. I am trying to create a formula rule to highlight a cell range based on one cell but for multiple options.
E.g. Cell C4 has a date of 21/3/2021, and D4 has a date of 19/02/1998; I am trying to create a rule to highlight date ranges in different colours. 5 years.
Then I want to use that to highlight C4,5,6,7 etc., based on that range.
I have tried using an if and statement and a datedif statement, but it doesn't seem to want to work. Is this at all possible?
Thanks!
Hi!
Select the range of cells for conditional formatting. For example, C4:C10. Create a conditional formatting rule with the formula
=DATEDIF(D4,C4,"y")>5
Note that the formula must refer to the first cell of the range.
You can learn more about DATEDIF function in this article: Excel DATEDIF to calculate date difference in days, weeks, months or years.
Thanks! I have tried to make the next selection of between 1 & 2 years, and 2 and 5 years, The formula works (no error) but it is not highlighting...
=AND((DATEDIF($G$4,$B$1,"Y")>1),(DATEDIF($G$4,$B$1,"Y")<2))
Have I used the right formula?
Thanks again
The conditions in your formula cannot be met at the same time. Perhaps you should use >= and <=
SORTED!
=AND((DATEDIF($G$4,$B$1,"M")>24),(DATEDIF($G$4,$B$1,"M")<60))
I changed it to months :)
Thanks!
Sorry, date ranges would be Under 1 year, 1-2 years, 2-5 years and over 5 years.
Hello,
I have a set of dates for various personnel training attended, that expire within 1 year, 2 years, 3 years and so on. I would like to use conditional formatting to turn the cells yellow when they are 90 days out from expiry and red when the dates have expired. I can't seem to find the right combinations of rules to make this work, as most are based on the current date in excel rather than the given date in the cell. Please help!
Thank you.
Hi! Replace the TODAY() function in the conditional formatting date formulas you see above in the article with a cell reference. Instead of =TODAY()-$A2>30 write =$A1-$A2>30
Hi,
I’m trying to get the following formulas to work on the same table but they won’t work together, it’s like they cancel each other out
=AND($D2-TODAY()>=0,$D2-TODAY()=0,TODAY()-$D2<=7)
I also want to be able to get it to work for multiple end dates but it won’t allow the formula to work on more than one row.
Please help
Hi! The second condition repeats the first. The third condition contradicts the second. The formula will always return FALSE.
Ok so how do I get it to work to show both when it’s exceeded deadline and when it’s close to deadline?
And is it possible to have it work for multiple deadline dates
You want me to use your wrong formula to guess what you want to do. Pay attention to the following paragraph of the article above: How to highlight dates within a date range.
Now can I formulate a date that actually says the month. "January 2" instead of 1/2 or 2 Jan or the others?
Hi!
If a cell has a date in it, you can change its format as described in this article: How to change Excel date format and create custom formatting. For example, "mmmm d".
Hi, I'm trying to set up an employee directory that has the weekdays and times they're available. I currently have two cells that have the formula =NOW() (with one having the custom format to display "Fri" and the other to display hh:mm:ss am/pm). I would like to change the cells change colour to red if the day is Friday and they are not working (ie if they only work Mon-Thu etc). How would I go about conditionally formatting this?
Hi!
To define the number of the day of the week, use the WEEKDAY formula.
Here's an example of a conditional formatting formula for Friday:
=WEEKDAY(A1,2)=5
Hello -
I'm trying to set up an inspection record template with separate Receipt Date and Expiration Date cells, where the Expiration Date cell will be automatically highlighted if the value entered there is <12 months from the Receipt Date. The Receipt Date will not always be the same date that the record is getting filled out, which is where I'm running into trouble. Please help?
Hi I have the following:
Sheet 1
Column A: list of employee names
Column B: employee title
Column C: hire date
Column D: # of years with company
I am trying to sort this list on a new sheet so that all employees and their info from each column on sheet 1 is populated according to their anniversary date for 2023, but also separated by month. So if the employee anniversary date is in January, the employee and their info would be pulled from sheet 1 and listed under January 2023...and do this for each month. Is there a way to do this?
Hi! To get data from the table according to the criterion, use the FILTER function.
=FILTER(A2:D10,MONTH(C2:C10)=1)
To sort the resulting data, use the SORT function.
=SORT(FILTER(A2:D10,MONTH(C2:C10)=1),3,1)
This should solve your task.
Hello!
I'm not sure what the problem is with the Receipt Date and why you can't use the recommendations in the article above. I think this tutorial will help you calculate the difference between Receipt Date and Expiration Date in months: Calculate number of months between two dates in Excel.
What formula can I use if I want a row to fill with color after the date is typed into a cell? Example: 3/15/2023 is typed into E3, how can I have A3:E3 turn green?
Hello!
Here is the article that may be helpful to you: Highlight row if cell is not blank.
Hello,
I am trying to make a formula where I want the cell to be highlighted when it says "In Progress" and the date is past 14 days.
Column C is the date posted, and Column E is the status column (Ready, In Progress, ect.)
This is the formula I thought would work, but am getting an error message:
=AND(TODAY()-C3>=14, E3 = “In Progress”)
The error I'm getting says "you may not use reference operators (such as unions, intersections, and ranges), array constants, or the LAMBDA function for conditional formatting criteria."
Hi!
I assume you used the wrong quotes for the text string.
Use the formula:
=AND(TODAY()-C3>=14, E3 = "In Progress")
I have a spreadsheet that I need help with.
I need to highlight the cell if a date entered is within the current quarter.
Qtr1 Oct-Dec
Qtr2 Jan-Mar
Qtr3 Apr-Jun
Qtr4 Jul-Sep
If not, then highlighted red. If so, then highlighted green.
Hi!
You can determine the quarter number by date using the MONTH function and rounding.
=ROUNDUP(MONTH(A1)/3,0)
You can define a partial match of the quarter number with the text by using a formula like this
=ISNUMBER(SEARCH(ROUNDUP(MONTH(A1)/3,0),B1))
For more information, please read: How to find substring in Excel
I'd like to format cells to highlight based on a date range not related to today's current date (e.g., highlight all cells with dates from June 2022-December 2022 with one color, highlight January 2023-June 2023 with a different color, etc.). The tricky part is the dates I want referenced are on sheet 2 and the cells I want formatted are on sheet 1. Is this something that is possible?
Hello!
To correctly use references to cells from another worksheet in a formula, see these guidelines - Excel reference to another sheet or workbook (external reference).
I have a spread sheet with notes being taken daily with dates input using CTRL ;
these dates are mixed in with notes Example. 06/03/2023 important information here
I was wondering if there is a way at all to highlight or change the text color of the date only automatically without changing the text of the entire cell or color of cell?
Hi!
Unfortunately, you can only change a part of the cell formatting manually or with VBA.
Hello, I am looking for help on a conditional format:
- I have a column (E8) for a deadline and a column (D8) for progress. Progress column is formatted as a percentage and conditionally formatted as a data bar (so will show a progress bar based on percentage entered). I am trying to highlight cell in the deadline column (E8) when deadline is overdue AND Progress column(D8) is less than 100%. I also want to ignore all blanks but I have a format for now that place ignoring blanks higher up on the hierarchy of formatting. Any suggesting for a formula would be great appreciated as I have tried numerous with no success,
Hi!
I’m sorry but your description doesn’t give me a complete understanding of your task. Correct me if I’m wrong, but I believe the conditional formatting formula below will help:
=AND(D8<1,E8<today())
You can also find useful information in this article: Apply multiple conditional formatting rules to same cells.
IF I HAVECHANGE DATE ,EFFICIENCCY CALCULATE WITH CHANGES DATE WHAT CONDITION USED
Good Day,
I hope you can help.
I have a client Data base. I have a coloumn (Last Groomed) = (G) and (Next Groom) = (H). Due to the nature of my business the client will tell me when the next groom will be or if it is a monthly standing booking.
So the formula i have in H is as such (=G3+30) which will give me 30 days from today.
So what i need is a rule / format / Formula, that highlights cells 10 days before (Today)=(A1) (in Orange) and 10 days after (Today)=(A1) automatically when i open the workbook.
Thank you your assistance is appreciated
Hi!
Pay attention to the following paragraph of the article above – Conditionally format dates based on the current date.
For example,
=$A1-TODAY()>=10 - highlights dates that occur in 10 or more days.
Hi
may I have some help please.
Job Number Job Description Booking Date Target Date Completed Date Additional Notes
1 test 14/02/2023 25/01/2024 14/02/2023 Done
How do I make the entire row green once a 'completed date' has been inputted?
there is a conditional format for target date which works perfectly and I don't want to disturb that.
Kind regards,
Abdul
Hello!
Create another conditional formatting rule using this instruction: How to change the row color based on a cell's value. I hope it’ll be helpful.
I have a list of dates and I want to color the cells which contain the dates, conditionally every time the year changes. So, all of 2023 would be one color and all of 2022 would be a different color, and on and on. But, these cells are a complete date, for example, 02/10/2023, so I need to learn how to just extract the year from these cells and conditionally format based on only the year. Thanks for your help.
Hi!
Use the recommendations from the article above. To determine the year, use the YEAR function. Try a conditional formatting formula like this:
YEAR(A1)=2022
I have dates from the early 1900s through today, hundreds of rows, each year having a different quantity of rows. Is there a way for conditional formatting to automatically have Excel assign a different color based on which year it is? It would take forever to write an individual formula for 100+ years. Or if there is a way to highlight all 2023 rows in one shade of grey and then all of 2022 in another shade and then 2021 back to the shade of grey of the 2023 years? I'm just trying to visually see when the year changes and which rows are included in that particular year.
Hello!
You need to create a separate conditional formatting rule for each color. To make this rule work for different years, use the logical OR function.
=OR(YEAR(A1)=2023,YEAR(A1)=2021,YEAR(A1)=2019)
or
=SUM(--(YEAR(A1)={2023,2021,2019}))
Rule for all odd years -
=MOD(YEAR(A1),2)=1
Rule for all even years -
=MOD(YEAR(A1),2)=0
I hope it’ll be helpful.
I am setting up a spreadsheet that will be keeping track of animal licensing information:
id#
owner name
pet name
expiration date of vaccine
expiration date of license
ect...
I am looking to make certain cells change to colors depending on the dates of the license expiration and or if I change the status of the owner. currently it is sep up as such:
A- last name
B-first name
C-license status (drop down list for the following options - expired, current, in progress, township sending notice and attending clinic)
D-date license expires
E- phone
F- house #
G-street address
H- township located
I-last vaccination date
ect...
I need to set up a system where:
anything before 10/31/22 (or 44865) turns red
anything between 11/1/22() and 1/31/23 (44957) turn yellow
and anything up to now turns green
I also want to be able to change the status colomn and have it effect the color. so if a license is expired but the owner is trying to go to a clinic I can choose attending clinic in colomn c and it will change it to an overriding color to indicate that status. Is this possible?
Hi!
Have you tried the ways described in this blog post? Create a rule for each color according to the recommendations in the article above.
I have tried several of the methods but I cant figure out how to make it conditional, ie-when cell turned on then the color is turned on but when off the color turns off.
Hi!
What does "cell turned on" mean? What cell conditions are you checking for? What are those conditions? I can't guess.
So with a drop down box there are two options-ON, OFF. when I select the option for on in a cell I want a color to appear in a row of cells designated. for example if I want to have a cell that is for EXPIRED animal licenses. I have a box colored red that states expired and a drop down box in the cell below it with ON and OFF. when the second cell states on I want all the cells in another box that say EXPIRED to turn red. When the cell is turned OFF I want the cells to go back to no color.
Hi!
If I understand your task correctly, try the following conditional formatting formula:
=AND(D2="Expired",$F$1="on")
So if I am understanding correctly than my formulas would be the following:
=IF(AND(D2:D125>41305,D2:D12544957,D2:D12544865,D2:D125<44957),"township sending notice")
noting that these values are dates but were turned into numeric for easier formula use but show as dates on the excel sheet
ok so if my cell for c is c6 and I am doing
cell value is equal to ="EXPIRED"
and my D cell value is between =41305 and =44865
then would my new c value be ="EXPIRED" =IF(D2=
im not sure how to add the varience in the newly made format. it would have to show the cell value is equal to = EXPIRED but also add only if its between the numbers 41305 and 44865
For a multi-condition formula, use these guidelines: IF AND in Excel: nested formula, multiple statements.
=IF(AND(D2>41305,D2<44865),"expired","")
MAYBE I AM NOT UNDERSTANDING BECAUSE I CANNOT GET IT TO FORMAT CORRECTLY. COULD I INSTEAD HAVE FOR EXAMPLE D CELLS DECIDE ON THE ACTION OF THE C CELLS? SO IF A DATE IS EXPIRED IN THE D CELL THEN THE C CELL WILL AUTOMATICALLY SAY EXPIRED AND TURN RED? WITH THE OPTION TO CHANGE THE COLOR IF PROGRESS IS PENDING? THIS MIGHT BE A BETTER IDEA. DOES THAT MAKE SENSE?
Hi!
You can change the value in cell C2 depending on the date in D2 with the formula =IF(D2<TODAY(), "off", "expired") You can change the color of C2 with the conditional formatting formula =D2<TODAY()
But if cell C2 contains a drop-down list, this cannot work.
Is there a way to dynamically change cells according to time instead? I am working with a daily schedule and I would like to see what is happening at what hour when I look at it.
Hi!
I'm really sorry, looks like this is not possible with the standard Excel options.
So I have a worksheet that shows production data on a calendar. The dates are pulled from a website so they will auto rotate which cell shows which dates. I use this sheet to see when I can schedule new orders to ship. This also depends on what shipping routes are available. I have created a new tab with all my routes and and their schedules.
I have added a drop down on my main page to select the route. Now I want to highlight cells in the schedule based on which route is selected.
My excel terminology is limited so I will attempt to describe the formula I am looking for;
Rule 1) If this route is selected then highlight all Tuesday/Fridays
Rule 2) if this route is selected highlight all Monday/Wednesdays
-so on and so forth for other routes and their respective days.
I cannot find the formula excel needs to make this happen. Am I overthinking this and there is a simple solution/equation? or is this something excel cannot do?
Hello!
Use the WEEKDAY formula to determine the day of the week. For example, conditional formatting formula:
=OR(WEEKDAY(A1,2)=2,WEEKDAY(A1,2)=5)
Thanks, yes I was able to get the correct days highlighted using this equation:
=OR(WEEKDAY($B2,2)=3, WEEKDAY($B2)=2)
The tricky part for me is having this contingent on a cell showing different route options. For example:
If i select "ALL01" then Tuesdays and Thursdays will highlight
If i select "CHI01" then Tuesdays and Fridays need to highlight
The selections is being made in a drop down i created.
The "ALL01" & "CHI01" are routes we use.
Hi!
Add another AND condition:
=AND($M$1="ALL01",OR(WEEKDAY($B2,2)=4, WEEKDAY($B2,2)=2))
Hazaaa!!!
That worked - thank you so very much!!
Hello!
I am using the conditional formatting steps detailed above for past dates, future dates, and todays dates. However the formulas do not seem to be working. What do I do?
Hi!
I can't know what you are doing in your workbook. Note that the dates are written as dates and not as text. Follow the instructions in the article above carefully.
Help! I really hope you can respond to this and help me!
I need a formula(s) to apply conditional formatting based on various dates in a column both on the same tab and from a previous tab in the same workbook. Column A is "Date Received" (where the date will vary by when something was received). Column B would be Date Created.
The basics of the formula I need would be if Column A date is greater than 1 week (or 7 days, whichever is easier), format the cell yellow, if greater than 2 weeks (14 days), format the cell red.
Specific Example: If a date isn't entered in Column B within one week (or 7 days, which ever is easier), the cell in Column A will turn yellow, if no date is entered in Column B within 2 weeks (or 14 days) the cell in Column A will turn Red. If a date is entered in Column B the cell in Column B with the date can turn green.
The ideal formatting would be to add icon sets with with the stop lights instead of highlighting the cell with a color. I believe there is an option to enter a custom formula to apply it with the icon sets, correct? If so, I will do that using the formula above. If not, it's not a deal-breaker.
One other thing, how do I reference a column from another tab so it will add and show two weeks after the date in a column of the other tab. Example - Column A "Quote for Approval" in Tab 1 has a date entered for when the quote was submitted. We need Column B in Tab 2 to add 2 weeks (14 days) and put that in Column A from Tab 1. The conditional formatting for that date in Tab 2 would be based on the original date in Tab 1 but would be the same concept of >7 days, >14 days.
I really hope this makes sense. Please let me know if you have questions and thank you very much for having the forum!!!
Hello!
Date-based conditional formatting is detailed in the article above. You may also be interested in this article: Excel Icon Sets conditional formatting: inbuilt and custom.
Hi Alexander Trifuntov (Ablebits Team)
I'm trying to make a scheduling template for 18 employees. I can't figure out how I can auto-highlight the scheduled time (interval of 9 hours) when I put the shedule in a different cell, then also apply a different color when I type in a break time in a different cell as well.
F4 - schedule (9am-6pm)
F4 - 1st break (11 am)
G4 - Lunch start (1pm)
H4 - Lunch End (2pm)
I4 - 2nd break
Trying to apply the formatting to K4-BF18, every cell from J4 is considered a 15 min interval.
Also, I would like to change the color of each cell within the time range when agent's status in J4 is absent or late. I hope you can help me. Thank you so much in advance!
Hi!
Sorry, I do not fully understand the task. What formatting do you want to apply in K4? Why are there two values in F4? What does it mean "agent's status in J4 is absent or late"?
When we entering date 1/1/30 in excel its returning 1/01/1930 or 1/1/40 its returning 1/01/1940.I am expecting 01/01/2030 or 01/01/2040 in this case.Is it possible to fix this using conditional formating.I need to fix this in excel only.Can you please let me know best possible way.
Hello!
Set the cell to the date format you want. For example - dd/mm/yyyy. Use these guidelines: How to change Excel date format and create custom formatting.
Thank you Alex. My cell has value 31-DEC-30 ,Converted cell to date format DD-MON-YYYY .Its converting to 31-DEC-1930. Getting year wrong in Excel 2016.I have column formula =IF(ISBLANK(X89),"",DATEVALUE(X89)).
Issue:
30 through 99 is interpreted as the years 1930 through 1999. For example, if you type the date 5/28/98, Excel assumes the date is May 28, 1998.
Hi!
Your problem is described here: Fixing dates with two-digit years.
Or create a date with the DATE function:
=DATE("20"&RIGHT(A1,2),MONTH("1"&MID(A1,4,3)),LEFT(A1,2))
AlexChanged system date settings.Still it’s not working.
Hello. I have three columns of dates (all on the same row). I need column C to highlight green if the date is before both dates in columns A and B, highlight yellow if it’s before only one date (A or B) and past the other date (A or B), and highlight red if it’s past both dates A and B.
Hello!
Create 3 conditional formatting rules using these formulas:
=AND(B1>C1,A1>C1)
=((C1>B1)+(C1>A1))=1
=AND(B1<C1,A1<C1)
I hope my advice will help you solve your task.
I need to figure out how to have a date change color after the date has reached 6 months and a different color for when its been 1 year. This is dealing with date of employment and the 6 month and year bench marks are for raises.
The date conditional formatting only goes back a month.
Would also be amazing if when the color changes that it sparks an email to the hiring manager.
Hi!
Please re-check the article above since it covers your case. Sending an email automatically is possible with a VBA macro.
I need to conditional format cells so that they are automatically coloured in when the date changes in the first column.
I have used the eomonth formula in a col before the calendar date rows start. If I change the date on cell b10 then the eomonth formula gets updated in cell e10.
I need the the next section which the dates Jan to Dec per year sections to highlight cell accordingly to the date in cell b10.
Hi!
Based on your description, it is hard to completely understand your task. To determine the month, try the MONTH function.
Hi, I'm trying to set up conditional format for a specific time range between 0-10 hours , Kindly assist with best approach.
Thanks in anticipation
Thank you for taking the time to put this together. It is helpful for highlighting holidays. However, if a holiday falls on a Saturday or Sunday my agency observes the holiday on the Friday prior, or Monday after. Is there a way to have excel highlight the Friday prior to a Saturday holiday, or the Monday after a Sunday holiday?
Hello --
Not sure if I'm following the right thread. But I'm in Google Sheet and I have the same exact problem.
I wanna highlight cells that match another set of cells.
For example : cell E4:O4 contains time - and below them are E8:M399 with time as well. And I want to highlight the time in cell E8:M399 to match E4:O4..
I'm using =match(E8,indirect("SCHEDULE & COVERAGE!E4:O4"),0) applied to range E8:M399
It actually works to all cells except if the time from E8 starts with 12am or 0:00
It works if the time 12am or 0:00 is in the middle for example J8..
Hi,
How do I highlight a course date that is due to be renewed. Let say, I attended a course on the 1/11/2022. And the course has to be renewed after 3 years which is 1/11/2025. What can I do to highlight the course date if the actual date is 3 months before the renewal date i.e > 1/8/2025? Thank you
Hi!
Please reread the article above since it covers your case.