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 3. Total comments: 1245
Hi, I have dates in column B, I want to highlight 2 days before date from todays date but dont want to include if holiday or weekend falls in betweek. I want to highlight only working days.
COP Date
9/7/2023
12/4/2023
12/12/2023
12/15/2023
12/12/2023
12/12/2023
12/14/2023
Hi! To count working days between 2 dates, use NETWORKDAYS.INTL function. For example,
NETWORKDAYS.INTL(A1,TODAY(),1)<=2
But you cannot specify how many cells to highlight in conditional formatting. All cells that match the condition will be highlighted.
Thank you for the article - trying to use a conditional formatting to change the color based on time elapsed. For example if value in format hh:mm is between 00:01 and 06:00, green. If 06:01 to 12:00, yellow. 12:01 to 24:00 red. If > 24:01, dark red.
Thank you!
Hi! To check the time or date interval, use the AND function as recommended in the article above. To set a time value, use the TIME function. You can also convert time to a decimal number, as in the second formula below:
=AND(A1>0,A1<TIME(6,0,0))
=AND(A1>0,A1<6/24)
I hope my advice will help you solve your task.
I created a vendor payment reminded with vendors detail, date of goods supply and payment due date.
i would like to also create a column with the text "PAID" "UNPAID" highlighted in green or red after payment due date elapses.
Hi! Please re-check the article above since it covers your case.
Hello,
Would you please help me to understand it better?
I have a table from from B10 to Q200 - where Colum K has dates and Colum L has prices.
I need to highlight a row where price ="" and date =In less than 7 days
I'm using this formula, but it only works for 1 row:
=AND($K$10-TODAY()>=1, $K$10-TODAY()<7, $L$10="")
How do I make it work for the whole table?
Please help
Hi! The following tutorial should help: Relative and absolute cell references in Excel conditional formatting. Please use the formula below:
=AND($K1-TODAY()>=1, $K1-TODAY()<7, $L1="")
Hello,
I'd like to set conditional formatting on a cell by % complete within a date rage.
Example would be:
Initial Target Complete % Complete Status
11/27/2023 100% Blue
12/15/2023 65% Yellow
12/06/2023 30% Red
If within 7 days of target completion date and % Complete is below 50% cell turns red
If within 7 days of target completion date and % Complete above 50% below 76% cell turns yellow
If within 7 days of target completion date and % Complete is above 75% and below 100% cell turns green
If % Complete is 100% cell turns Blue
Any assistance you could give would be greatly appreciated.
Hi! Create a separate conditional formatting rule for each color. For example, for red:
=AND((TODAY()-A1)>7,B1<50%)
For more information, please visit: Excel conditional formatting formulas based on another cell.
I understand how to conditionally format based on a specific date by using it's numerical value. However, how to I set a conditional format based on the whether the date in one column is before or after a date in another column. For example, if one column is the approval date and another is the review date, I want to highlight when the review date is after the approval date. I tried just using B2>D2, but that didn't return the conditioned format.
Hi! If your dates are written as date rather than text, the conditional formatting formula =B2<D2 should work. B2 - is approval date.
I'm trying to get a cell containing a month (listed as 11/01/2023 - 11/30/2023) to turn green if it contains today's date in that whole range of dates. I've already got my initial cell set up with = today() and it's working, but the existing date conditional formatting options are all about being before or after today, and I tried the is equal to today option but it didn't work (i think because I'm listing a range rather than each day in the month separately). I'm thinking I need to use the conditional formatting based on a formula setting but I'm not sure what formula to use. I'm open to putting the first day of the month and the last in separate cells, but listing every day somewhere would be difficult. Any help would be appreciated!
Hi! Specify the month number and select the cells where the date corresponds to this month. Use the MONTH function to find the month number by date.
You can also try the formulas from this paragraph above: How to highlight dates within a date range.
Hello,
i have a sheet containing end date for warranties and i need to creat a conditional formating rule with a formula to indicate when the date is 2 months out.
I have tried =$A2-TODAY()>60 but it does not seem to be working. it is highligning the wrong cells.
How can i solve the issue? Is there a formula that would be better suited for my needs?
thank you!
Hi! In a conditional formatting formula, use the cell reference in the first row, even if the conditional formatting range begins on the second row.
=$A1-TODAY()>60
I am looking to create
Moved to Outcome 1 Month Due Verified Amount
18-Aug-23 18-Sep-23 Y $123.00
25-Aug-23 25-Sep-23 P $456.00
31-Aug-23 30-Sep-23 N $789.00
The values in the cells in the "1 Month Due" column are calculated based on the values in the "Moved to Outcome" column using the "=EDATE (F2, 1)" formula, where F2 holds the "Moved to Outcome" date.
I want to format things so when the value showing the "1 Month Due" column is 1 week past the current date, the cells in the "1 Month Due", "Verified" and "Amount" columns turn orange, and when the date in the "1 Month Due" column is 1 week or more past the current date, the cells turn red.
In addition, I would also like to have the cells the "1 Month Due", "Verified" and "Amount" columns changed based on the value in the "Verified" column.
I have set up the conditional formatting in the "Verified" column so that a cell containing a "Y" turns green, a cell containing a "P" turns yellow, and a cell containing a "N" turns red. I would like this to apply to the "1 Month Due" and "Amount" columns as well, and to override the conditioning based mentioned above (based on the "1 Month Due" condition).
I hope that makes sense, and thanks very much, in advance, for any assistance you can provide - this one has been a real noodle-scratcher for me :)
Hi! Please read the above article carefully. You can highlight a cell with a color if the date is greater than the current date by more than 7 days by using the formula:
=B1-TODAY()>=7
You can also find useful information in this article: Excel conditional formatting formulas based on another cell.
Hello!
I have a matrix for health tests. I can't seem to get past the last month/next month issue. I need anyone who is out of date to go red but cannot work out how to do this past last month (I basically need last month and previous)
Any ideas? :)
Hello! I hope you have studied the recommendations in the tutorial above. Unfortunately, your information is not enough to recommend a conditional formatting formula to you. How do you determine "out of date"? Do you want to highlight with color only the current and last month's dates? Describe the problem in more detail.
I'm looking to pull data from one tab (which is a big list of information) into a summary on another tab. I want to display the name (B2), sub-name (C2) and date due (Q2) within a 21 day window (so it will show everything due within the next 3 weeks, based on today's date). Struggling to find a formula that will do this but I'm sure I've seen it elsewhere before. Thanks
Hi! You can get the data for 21 days using the FILTER function. You can find the examples and detailed instructions here: Excel FILTER function - dynamic filtering with formulas. I hope it’ll be helpful. If something is still unclear, please feel free to ask.
I have a temp chart that is recorded on daily per month. Is there a way to highlight a missed day and/or missing element (multiple recordings on 1 day), and then lock that day so it can not be retro entered in? While I'm at it, on a separate sheet, I also have a daily task checklist on equipment that I'd like to have the same functions on if something is not recorded or a day missed. It also is a monthly calendar.
Hi! I'm really sorry, looks like this is not possible with the standard Excel options.
I have a spreadsheet that I want to highlight when someone is expired. For example: Column B will be the date they completed the training, in column C I want the date they are due to do the training again. 2 year time frame. I want the cell highlighted (filled) so we can see the expired employees. Is this possible? I saw your example from above but I didn't think it would work for what I am trying to do.
Thanks!
Hi! To add two years to a date in Excel, use a formula:
=DATE(YEAR(B2) + 2, MONTH(B2), DAY(B2))
Read more: How to add and subtract dates, days, weeks, months and years in Excel.
To highlight past dates, use the information from this paragraph in the article above: Conditionally format dates in Excel based on the current date.
Please advise, previously I have provided a weekly time column, for example week 1 to week 10, how to do it so that when I input some data it will automatically be forwarded to the column according to the time period I have provided.
The place where I input the data does not change, only the results can be reflected in the time column according to the time entered. Thank You
Hi! If you have a column with dates, you can extract data for a specific date using these instructions: How to Vlookup multiple values in Excel with criteria. You can also use the FILTER function to get data for a specific date.
You can automatically copy data to another column based on the current date using VBA.
Hi,
I have a spreadsheet containing dates of Insurances.
I have conditional formatting for anything from today to highlight in red. So I know that they have expired.
I am now wanting to add in another conditional formatting for any that are due to expire in the next 2 weeks from 'today' I have tried with a formula of '=AND($D2-TODAY()>=0,$D2-TODAY()<=14)' but is it highlighting insurances that are expiring in 2024.
Please can anyone advise where I am going wrong?
Thanks
Hi! I'm not quite sure what the problem is with this formula. It returns TRUE for a future date no more than 14 days from now. Currently, this conditional formatting formula cannot highlight 2024 dates.
I have a spreadsheet with a list of documents my team needs to review. Whenever the documents are revised, it gets updated on the spreadsheet. I set up the conditional formatting highlight the employees cell green if their review is later than the revision and red if it's prior to the revision. I am facing two problems.
1. If I create the conditions for both in the topmost cell and drag it down to the last cell they all use the first reference cell to compare, even if I take out the $,( i.e. change $B$5 to B5).
2. If I create a CF formula for each cell individually, aside from taking forever, it also returned a different result in the second cell, even though the conditions were exactly the same as the first cell.
Thank you
Hi! Create a condition not for one cell, but for a range of cells: for example, B2:B100. Use the address of the first row of this range in the conditional formatting formula. Read more: Excel conditional formatting formulas based on another cell.
I have a spreadsheet covering events over a 3-month timeframe.
I'd like to highlight rows based on the date the event occurred. There may be one or more rows with one date.
Example: my spreadsheet has 133 rows of data for dates from 01 Jun through 31 Aug. Three rows have events that occurred on 01 Jun; One row with an event that occurred on 02 Jun; No events occurred on 03, 04, or 05 Jun; Eight rows for events that occurred on 06 Jun; etc.
Is it possible to define conditional formatting that will highlight the 3 rows for 01 Jun with a different color that the one row for 02 Jun and yet another color for the 8 rows for 06 Jun?
Hi! For each date, create a separate conditional formatting rule with different colors.
That is not helpful. It'd be faster to filter by date and add color to the rows that appear for each date.
I have made a training matrix for staff at work, and want to highlight training that is in date as green, out of date (1 year after completion date) Red and due ( 11 months after completion date) orange.
All the necessary information is in the article above. To find the date differences, use this guide: Excel DATEDIF function to get difference between two dates. For example, if the date difference is more than 1 year:
=DATEDIF(B1,A1,"Y") >= 1
Hi, I am trying to come up with conditional formatting rule that applies to a cell with a completion date that is past the due date listed in another cell. For example, say the "June By Date" is 6/1/23 in cell O3 and "June Completion Date" is listed as 6/9/23, that cell would then be formatted. I am running into the issue of applying this to all rows in that table.
Hi! You can simply compare cells and apply this conditional formatting formula to a range of date cells. For example:
=A1<$D$1
Maybe this article will be helpful: Relative and absolute cell references in Excel conditional formatting.
Hi!
I have put on an alarm sound VBA code and saved it on the spreadsheet that I want to use it for.
The spreadsheet is so that the alarm sound must go off every second day from the dates that I put in. The problem is I don't know what formula to use and how to set it to go off every second day.
Hi! Use the MOD function to determine when the difference between the current date and the date that you put in is an even number.
=MOD(TODAY()-A1,2)=0
I would like to highlight the date in C1 if the date in A1 is more than one calendar month. Not necessarily 30 days. For example, A1 is 01/19/23 and C1 is 02/23/23. Over 30 days are between these dates, but a calendar month has not been skipped, so I do not want C1 highlighted.
Hi! If I understand the problem correctly, use the EOMONTH function to get the date in one month.
try this conditional formatting formula:
=(EOMONTH(A1,1)+1)<=C1
I apologize, I didn't explain what I wanted well. I would like C1 highlighted if a month was skipped. So A1 is a date in January, if C1 is a date in March, skipping February, I would like it highlighted. I tried the YM code, but, alas, it works on days, even though Excel Help said it ignored days and only looked at the month.
Have you tried the formula I gave you? It fits your conditions.
That did work. Thank you!
Hi,
I have a calendar in excel, I need to highlight two cells ( cell 1 = today's date and cell 2 = the adjacent cell below cell 1) been looking how to do this, but cant find an answer. Hope you can help me
Highlighting today's date is quite easy, what I find difficult is highlighting the cell 2
Thank you in advance
Hi! Use this conditional formatting formula and this instruction: Excel conditional formatting formulas based on another cell.
=IFERROR(OFFSET(A1,-1,0)=TODAY(),FALSE)
Use the OFFSET function to get the cell value one row higher.
Thank you very much for your help
Hi
I'm trying to change the cell colour to reflect length of service e.g under 2 years (red), over 2 years (orange) and over 5 years (green).
I am using the following formula to show the service length - =DATEDIF(E2,G2,"y")&" Years, "&DATEDIF(E2,G2,"ym")&" Months" - which shows as 4 years, 2 months. Is it possible to do cell colouring when it has both words and numbers?
Thanks
Hi! Your formula returns text. You cannot compare text to a number of years. Use the DATEDIF function without text, for example:
=DATEDIF(E2,G2,"y") < 2
Hi, i am creating a roster, what conditional formatting formula could i use to identify where someone has worked more than 11 shifts in a fortnight and identify the last night shift worked. i have plotted the roster using shift codes. Thanks
Hi! I can't recommend a formula to you as I can't see your data.
Hi, I'm working on a project and would like any task end dates (in column L) to highlight red once they're overdue but only if the task status (in column I) does not include the text "Completed". Could you help please?
Hi! If I understand your task correctly, the following formula should work for you:
=(ISNUMBER(SEARCH("Completed",I1)))*(L1How to find substring in Excel
I need to highlight a cell if it is 2+ days past another certain cell. I have a list of dates in different columns and if the date in one column is 2 or greater than the cell to the left of it I want it to highlight. Is this possible?
Hi! Find the difference in days between the dates. For example:
=A1+2
Hey
I want to highlight "tomorrow" in excel. But: when tomorrow is a saturday or a sunday, i want it to highlight the first monday instead
(= i always want to highlight the next working day)
If today is friday 11/08/2023, then i want monday 14/08/2023 to be highlighted
if today is monday 14/08/2023, then i want tuesday 15/08/2023 to be highlighted
can you help me out please?
Hi! For conditional date formatting, try this formula, where D1 is today's date
=(A1=$D$1+CHOOSE(WEEKDAY($D$1,2),1,1,1,1,3,2,1))
For more information, please visit: CHOOSE function in Excel with formula examples
Hi, i am trying to colour a cell when a date & time appear dd/mm/yyyy hh/mm is there a formular for this
What formula would I use if I want to highlight dates from today that are more than 90 days in the future as green, from today to 90 days in the future as yellow, and dates in the past from today as red?
All the necessary information is in the article above.
I'm trying to find a formula where the cell turns in different colors:
Each cell has a date (example: 28/04/2016 - typed in cell D3), if 4 years and 6 months passed, it needs to turn orange. But is 5 years passed it needs to turn red.
Can someone help me with the right formula?
Hello! Please try the following conditional formatting formula:
=DATEDIF(A1,TODAY(),"m")/12>=4.5
You can learn more about DATEDIF function in this article: Excel DATEDIF to calculate date difference in days, weeks, months or years.
If i try this, i always get this:
"There's a problem with this formula. Not trying to type a formula? When the first character is an equal ('=') or minus ('-') sign, Excel thinks it's a formula:
* you type: = 1+1, cell shows: 2
To get around this, type an apostrophe (') first:
* you type: '=1+, cell shows: =1+1
Look at the character that separates function arguments in your Excel. It might be a semicolon.
Hello!
I am trying to have a cell turn red if the date is less than or equal to todays date, but I don't know the right formula.
I tried using the conditional formatting rule: Cell Value <= TODAY()
But, when I delete a date from that cell, it still shows a red fill color and I don't know how to remove it. Is there any way to remove the color if the cell is blank or do I need a different formula?
Thank you so much for your time!
Hello! Add another condition to the conditional formatting formula using the OR logical function.
=OR(D1<TODAY(),NOT(ISBLANK(D1)))
or
=OR(D1<TODAY(),D1<>"")
Hi. I have a spreadsheet which i would like to format to highlight when a specific date date is reached into the future. So for example, i want it to automatically highlight when 20 March is reached every year. How do i do that?
Hi! All the necessary information is in the article above.
To specify a specific date, use the DATE function.
=A1=DATE(2023,3,20)
Hello, I have a spreadsheet that A treatment plan date is entered in Column E. Which auto fills the date of 4 months ahead into column N and then 6 months ahead into column O. Columns N and O have autofilled date from the EDATE formula based on the treatment plan date in column A, I need to highlight cells in columns N and O yellow that are due within 2 weeks of the date autofilled and highlight cells red that are past due to the date autofilled. I have reviewed the highlight upcoming dates and delays and the cells aren't becoming formatted. Please help.
Hi! Unfortunately, I don't understand what date you want to compare the dates in columns N and O to. If the examples in the article above didn't help you, please explain in more detail. What dates and what formulas have you tried to use?
So sorry. I have a spreadsheet that shows an initial date that can happen at any time that is filled in when an assignment is completed. This is in column E. This spreadsheet continues on to reflect the due dates of 4 months after that date and 6 months after that date to show the quarterly and semi-annual due date for that assignment. In columns N and O respectively. I am struggling To get conditional formatting to show yellow two weeks before the due date and turn red when the item is past due. I have been able to get the cells in columns N and O to turn red if they are past due by using =$N3=1,$N3-TODAY()<15)" to have the cells turn yellow 15 days before the due date and that is not turning cells due within 14 days yellow. Also is there a way to set the formatting to clear when the date is met successfully?
Hi! If I understand the question correctly, create two conditional formatting rules with the formulas below. Arrange them in the correct order using these guidelines: Apply multiple conditional formatting rules to same cells.
=$N3-TODAY()<15
=$N3>TODAY()
I hope my advice will help you solve your task.
When I use =$N3-TODAY()<15 formula it is highlighting nearly all dates. In some instances, cells that have the same dates one is highlighted while the other isn't. Could this be because the date is an EMONTH formula and not put in directly?
The EOMONTH function always returns a date. You can manually enter either a date or text as a date.
Is that the reason why I can't get the cells to highlight properly because there is an edate in the cell?
I can't see your data. Check the dates that you entered manually. You may have entered them as text.
The columns that reflect the 4month and 6months date have an EDATE formula in to autofill the 4 month and 6 month value.
I need to highlight cells based on its value (date), to identify whether thats expired or not ;
where expiry criteria defined in a single master cell of that column (i.e. 2 years, 1 year etc)
For example
H column is representing a course
H100 = "1-JAN-2022"
Expiry of H column items (course validity) is in cell H3 = "2 Years"
There will be many rows of H, as well as other columns to mark validity in the same format
Can anyone guide?
Hi! You cannot use cell H3 for calculations because it contains text, not a number. If a number of years is written, you can use the DATEDIF function to calculate the difference in years.
Here is conditional formatting formula example:
=DATEDIF(H100,TODAY(),"y")>H3
Hi
Im looking for a function to do the next.
every 15th of the month I want a specific cell to decrease by 1 permanently.
all the things I tried turned back to the origianl once the date turned to the 16th.
please help
tnx :)
Hi! If I understand your task correctly, you can count the number of months from a certain date, for example from 15 Apr 2023, and add it to the cell value. Every 15th day this formula will increment by 1. For example,
DATEDIF(D1,TODAY(),"m")
Look for the example formulas here: Excel DATEDIF function to get difference between two dates.
I am looking to make a worksheet that will highlight a date if it is earlier than a specific date of the month. For instance, we have a check to do every month from the 16th of every month. I would like to be able for a cell to turn red if the date in it is earlier than the 16th of that month
Hi! Create the target dates with the DATE function. Get the current month and year using the MONTH and YEAR functions.
If I understand your task correctly, try the following formula:
=AND(D1=DATE(YEAR(D1),MONTH(D1),1))
Hi, Alexander, Who how link the second excel data to the first excel, when I update the new date? immediately, just change only a week.
Hi! Maybe this article will be helpful: Excel reference to another sheet or workbook (external reference)
Great information - but stops short of helping the beginner with coloring cells with date/time and leaving cells with text (PENDING) white. Would be really helpful if you explored the basic techniques for beginner to be able to master conditional formatting a cell to a color if there is a date time (period) vs. having the word PENDING. This complex issue is not covered, and when records are processed based on random date/times throughout the day you need to be able to highlight them. Hopefully, someone will report how to do that so I can apply it at my job. There is never training provided and receptionists are being tasked with more complex tasks daily. Would love support on this stuff. Thanks,
Hi! You can use the CELL function to determine if a cell has a date in it. If I understand your task correctly, try the following formula:
=LEFT(CELL("format",A1),1)="D"
Hello,
Thank you for this article - excellent information. I work in a home health agency. We need to keep track of patient in-home assessments which must be conducted every 180 days (6 months) per the dept. of health. We want to use Excel to alert us about where we are during those 180 days for all patients. For example, from the initial assessment (day 1) to day 90, the patient name should be GREEN. From day 91 to day 120, the patient name should be YELLOW. From day 121 to day 150, the patient name should be 40% ORANGE. From day 151 to day 179, the patient name should be 60% ORANGE. And, from day 180 and beyond, the patient name should be RED. Is there a way to use conditional formatting to accomplish this? Thank you!
Hello! To create conditional formatting by dates, use the recommendations from the article above. Create a separate rule for each color.
Pay attention to the following paragraph of the article above: How to highlight dates within a date range.
Hi. I am nouveau to excel. I am working on tracker and following column are in the sheet (1) Timeline, i.e., no. of days in which we get approval, (2) Initial submission date, (3) Due date [=(1) + (2)] (4) Query received (5) Query response (6) Approval. I want formula for following
(A) The value should reflect 0 (Zero) in due date cell when due date values come 00/01/1900 (as there is no submission) and no highlight
(B) Highlight the due date cell RED when due date exceed the timeline [=Due date<TODAY()] and GREEN When the due date is within timeline
(C) Highlight the due date cell YELLOW when there is date value in query received column
(D) Highlight the due date cell when there is date value in Query response column and follow condition as per B above.
(C) No highlight when there is date value in approval column.
Hey everyone, if I have multiple sheets with contract names in column A and expiration dates of certain criteria in columns D and G, is there a way to fun a formula where when one of the limits is within 6 months or 3 months, that it is highlighted? Or is there an option where if I create a summary page, that when a date is within 6 months, on the summary page, it will display contract names and expiration date?
Hi! You can read the detailed instructions in the article above on how to highlight the dates you want. You can create a pivot table and select the dates you want in it using these instructions. You can also use the FILTER function to get a list of data in which a date matches a criterion.
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.