Comments on: How to conditionally format dates and time in Excel with formulas and inbuilt rules

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 2. Total comments: 758

  1. Hello, thanks for your work!
    We have a problem with expiration dates, expiration dates after product openning. We ar using this formula to calculate expiration date after openning if product expires after 10 days: =IF(J3="";"";J3+10) J - openning day.
    Ecample: Product X general expiration date is 2024-09-10, after openning, product expires after 10 days. We openned product on 2024-09-05, with formula we're using date we get is 2024-09-15, but, product expired on 2024-09-10.
    Is there some formula that makes cell red, if expiration date after openning is greater than general expiration date?

      1. Thank you for quick responce!
        Can we apply formula for whole column? For example: H column - expiration date, J - openning day, L - expiration date after openning. But H2 may be different from H3 and so on. =E3 > D3 is valid for one cell. We need, if possible, formula for section $L$1:$L$400.

  2. Great tips on formatting dates.

    How do I format the cells based on dates comparing 1 column cell with another column cell for the whole column

    i.e column B2 vs column C2 and the whole column if B2 is > C2

  3. Hi Alexander,

    Thanks so much for taking the time to reply to comments and provide such a comprehensive article.

    I am trying to use formulas to highlight past dates

    More than 10 days ago: =TODAY()-$A2>10
    From 4 to 9 days ago, inclusive: =AND(TODAY()-$A2>=4, TODAY()-$A2=0, TODAY()-$A2<3)

    These are all just altered based on the examples in the article, however I need them to apply to all the cells in column J (excluding title column)

    I have tried a few different things but none of them seem to work.

    Can you please help me?

    1. Sorry! Typo above ^^

      This is what I meant to do:

      red - More than 10 days ago: =TODAY()-$A2>10
      yellow - From 4 to 9 days ago, inclusive: =AND(TODAY()-$A2>=4, TODAY()-$A2=0, TODAY()-$A2<3)

      Need to apply these formulas to column J, any help greatly appreciated!

      1. From 4 to 9 days ago, inclusive: =AND(TODAY()-$A2>=4, TODAY()-$A2=1, TODAY()-$A2<3)

        1. Sorry this keeps changing my comment.

  4. Hi..
    I need to know how can I extract the date of a value if it changed. (Ex: if I fill in A2:A10 some values in 10-6-2024, in A2=55, after 7 days I changed to 66 but I keep the other values without any changes. I need a formula to know only the cells that have changed after the above dat.
    Thanks

  5. Hi,

    Sorry I have a second part of my question.

    I've created a Visual Basic Module, that sends an email reminder to me 1 week before check-in date (A1).
    When I 'run' the module from Visual Basic, it works (i.e. sends me an email) - but how/where/what do I insert (formula wise) and where, to tell the spreadsheet to run the module when it gets to 7 days out from the check-in date?

    1. Hi! You cannot run a macro at a specific time using an Excel formula.You can do this with another macro that will check the cell value and run your macro.

  6. Hi! First want to say this article has helped me so much in a number of reports I use so thank you for that! Secondly, I'm having trouble figuring out a conditional formatting formula for the following criteria.

    I want to highlight 1 cell based on if a group of other cells has a date that is less than or equal to Today. I've tried a number of formulas and can't seem to figure it out.
    Here's an example to better explain:

    B1 (Would some type of text)
    B2:B5 (These would have various dates)

    I want to highlight B1 if any cell from B2:B5 have a date equal to Today or Prior to Today.
    Do you know any formula or formulas that would work?

  7. Hi,
    Please assist me to get this answered.
    I have searched a lot with no results.
    I have a column that has dates formulated as 1/15/2016. I am asked to format the cells as Orange if that date falls on a Saturday or Sunday, and if it falls on Monday, to return as "1". How can I do that?
    I changed the date format to be (Friday, January 15, 2016), but then I do not know where to go?

    1. Hi! You can change the color of a cell depending on the day of the week using a conditional formatting formula. Use the WEEKDAY formula to do this. For example:

      =WEEKDAY(A1,2)>5

      However, either manually or using a VBA macro, you can change the date value to "1". Conditional formatting only changes the format, it does not change the value.

  8. Hi
    I am wanting to highlight times , that are not :00 , :15, :30, :45 in column C , using conditional formatting only as its an import from another sheet,
    i tried using unique but i am a little lost to making this work correctly
    eg
    Column A B C
    Wednesday 06:00 15:31
    Thursday 06:00 15:30
    Friday 06:00 15:47
    Saturday 00:00 00:00
    Sunday
    Monday 06:00 14:08
    Tuesday 06:00 15:30

    1. Hi! Use the MINUTE function to get the minutes from the time. To determine that the minutes are a multiple of 15, use the MOD function. In this case, the remainder of the division by 15 is 0. Create a conditional formatting formula in which the minutes are not a multiple of 15 and the remainder of the division by 15 is not 0.

      =MOD(MINUTE(C1),15)<>0

      1. thank you this worked perfectly

  9. Hello. I am working on a five-shift rotation calendar. The calendar covers the whole year. The calendar fills TODAY 's date cell with a chosen color. That works well.
    I would also like to fill five cells in the column directly below the date in a different color, to help the Shifts more easily identify who is on duty that day.
    I started trying to build a formula where if TODAY was anywhere in the column above, then these cells would highlight. But I can't seem to build a formula that will work.
    I wish I could post a Snagit (screenshot) of what I'm trying to accomplish.
    For example below, if today's date were 2, I would want the cells to the right of the shifts, below 2, to highlight.

    Date Columns
    2 3 4 5 6 7 8....
    etc...
    etc...
    Shift A NNNN
    Shift B DDD
    Shift C TTTT
    Shift D DDDD
    Shift E NNN

    1. Well, the columns I tried to manually build in my question didn't work out using spaces, and I can't edit it. The date columns should be shifted to right , as well as how D (day shift), N (night shift), and T (training) should line up.

  10. Now i need a help hope you would help me in our office we have a daily tracker in that we have 12 agents and works in 24/7 shifts we work on incident tickets as soon as the ticket arrives we have enter the ticket number in that sheet and change the color of the cell manually according to the time the ticket arrived for eg. if ticket came in between 8am to 9 am it will be green if it is between 9 am to 10 am then red if it is between 10 am to 11 am then purple so on so instead of changing the color manually i need a formula or a steps so based on current time when the data entered into a cell the color should change please suggest

    1. Hi! The above article contains all the information you need, so I hope you will read it. Use the TIME function to set the time. Here is an example of a conditional formatting formula for your question:

      =AND(A1>=TIME(9,0,0),A1<TIME(10,0,0))

      Create a separate conditional formatting rule for each time interval.

  11. Hello-How would I add conditional formating using an excel calendar template to highlight a Friday that is paydate if comparing to another worksheet that lists the pay dates

    1. Your title - "How to conditionally format dates and time in Excel" - is misleading. You have no examples dealing with formatting time values, just dates. I was looking for a simple way to format times in cells if they are between certain times of the day, say 8:00 AM & 5:00 PM. I can get it to work by storing these two values in some cells and then comparing against these but was looking for a way to conditionally format w/o having to store the two values in cells.

      1. Hi! Since the date and time in Excel are stored as numbers, you can get the time using mathematical functions. For example, using the INT function.

        A1-INT(A1)

        For conditional time formatting, you can use a formula like this:

        =(A1-INT(A1)) > TIME(14,0,0)

      2. actually the other way...5:00 PM & 8:00 AM.

  12. Hi I would like to highlight dates that are less than (X date) and greater than (X) date. I've been successful at highlighting in green (today and future datest) but i cant seem to add the second colour (red) for the dates in the past. Can you please help in how to formulate how to do this.

    I will be doing the same formula for other columns that dont have a set previous date but we want to highlight what is expired and what is up to date of the date when the excel report is generated. Thank you!

    1. Hi! You cannot add a second color to a conditional formatting rule. Create a separate conditional formatting rule for each color.

  13. I have a data entry sheet of 3 column. At column B I want to add goods name and at column C the quantity of goods. I want when I add goods name on column B entry date will auto generate on column A. Is it possible?

  14. Hello.

    Can you please help with the below example. Conditional formatting using 2 dates and 2 times.

    Date 1 (F7) and time 1 (G7) - Date 2 (N1) and time 2 (D7) - Highlight F7 if the start date and time is >26 hours after the end date and time

  15. Can you please advise what I am doing wrong here?
    I would like to highlight in green dates that are less than 21 days ago from today, yellow 21-40; red more than 40 days agp
    I am using the formulas
    Green: =Today()-$I3>21
    Yellow: =AND(TODAY()-$I3>=21,TODAY()-$I3=45
    This appears to be exactly what is pictured in the formulas above & i am not sure why it does not work
    It is in order green/yellow/red

    1. Hi! If I understand your task correctly, the following formula should work for you:

      Green: =Today()-$I3<21
      Yellow: =AND(TODAY()-$I3>=21,TODAY()-$I3<=40)

  16. Hi! I have been tasked to conditional format a cell that did not occur yet, like:
    Highlight dates that has not been occurring.

    1. Hi! Compare dates to the current date using the TODAY() function. Read this section carefully: Conditionally format dates based on the current date.

  17. I want to remove from this 2024-01-03T08:25:32.307+01:00 and use time only

    1. Hi! To extract the time from the text, use the SEARCH function to find the number of the position of the letter "T" after which the time is written. Then use the MID function to extract the time and use the TIMEVALUE function to convert the text string into a time value.
      Try this formula:

      =TIMEVALUE(MID(A1,SEARCH("T",A1)+1,8))

  18. Hi! I have a sheet that has discharge dates. We need to follow up with the patients at 24hours, 1 week, and 15-30 days. I need to highlight blank cells in column b when there is a value in column a based on 24 hours for column b, 1 week for column c and 15-30 days for column d. Formulas I input do not seem to work. Is this possible to have a sheet with this information?

  19. Hi!
    Would you be able to help me with the below?
    I want to highlight the date when it's in the last 7 days (which i managed to get =IF($G2<=TODAY()+7) but then if the status (selected from a drop down)in column I = Completed or closed, I don't need it be highlighted as no action is needed

    thansk in advance!
    Sabine

      1. thanks!

  20. I am in sales and i prepared a list of customers. I want to highlight the row that contains the customer name & from august till today the list is increasing. I want that after every 10 days the customers not been contacted can highlight the names that are due to be contacted.
    Please help.
    Thanks

    1. Hi! If you have a column with contact dates and a column with the date the customer was added, use the recommendations in this article to highlight the names that are due to be contacted.
      For example, C1 - contact date, B1 - date of addition:

      =AND(ISBLANK(C1),TODAY()-B1>10)

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

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

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

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

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

    1. Hi! If your dates are written as date rather than text, the conditional formatting formula =B2<D2 should work. B2 - is approval date.

  25. 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!

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

  26. 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!

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

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

  28. 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? :)

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

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

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

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

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

  32. 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?

      1. That is not helpful. It'd be faster to filter by date and add color to the rows that appear for each date.

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

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

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

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

          1. That did work. Thank you!

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

      1. Thank you very much for your help

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

  38. 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?

    1. Hi! If I understand your task correctly, the following formula should work for you:

      =(ISNUMBER(SEARCH("Completed",I1)))*(L1How to find substring in Excel

  39. 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?

  40. 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?

  41. 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?

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

  42. 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!

  43. 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?

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

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

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

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

  47. 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,

    1. 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"

  48. 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?

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

      1. Thank you so much for your quick response, I will give both these guides a look and try your formula!

  49. 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?

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

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

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

Post a comment



Thanks for your comment! Please note that all comments are pre-moderated, and off-topic ones may be deleted.
For faster help, please keep your question clear and concise. While we can't guarantee a reply to every question, we'll do our best to respond :)