+ Reply to Thread
Results 1 to 6 of 6

Today Statement

  1. #1
    Registered User
    Join Date
    08-21-2017
    Location
    Virginia
    MS-Off Ver
    MS Office 2019
    Posts
    19

    Today Statement

    Here is my formula for highlighting the cells during the 30 days leading up to the expiration date:

    =AND(TODAY()>=A1+335, TODAY()<A1+365)

    I would like to modify this formula to highlight dates that are current before the 30 days in green and dates that are overdue in red.

    Thank you for the help.

  2. #2
    Administrator FDibbins's Avatar
    Join Date
    12-29-2011
    Location
    Duncansville, PA USA
    MS-Off Ver
    Excel 7/10/13/16/365 (PC ver 2310)
    Posts
    52,946

    Re: Today Statement

    You need to use Conditional Formatting for that. If you are unfamiliar with using that, let me know.
    1. Use code tags for VBA. [code] Your Code [/code] (or use the # button)
    2. If your question is resolved, mark it SOLVED using the thread tools
    3. Click on the star if you think someone helped you

    Regards
    Ford

  3. #3
    Registered User
    Join Date
    08-21-2017
    Location
    Virginia
    MS-Off Ver
    MS Office 2019
    Posts
    19

    Re: Today Statement

    Thanks for replying. I'm familiar with conditional formatting. I just needed help in modifying the formula for reflect current dates in green and overdue dates in red.

  4. #4
    Forum Contributor
    Join Date
    02-04-2017
    Location
    chennai
    MS-Off Ver
    MS OFFICE 365
    Posts
    263

    Re: Today Statement

    Dear FDibbins

    try this

    Please Login or Register  to view this content.

  5. #5
    Registered User
    Join Date
    04-13-2022
    Location
    Kristianstad, Sweden
    MS-Off Ver
    2007/2016
    Posts
    21

    Re: Today Statement

    If I understand your problems with green and red dates I would do like this
    Produkt date older than 30 days from today highligt in red
    Produkt date less than 30 days from today highligt in green

    Use Conditional Formatting, Use a formula, and format fill

    For example if You have Produkt 1 date in cell A1

    Put 2 separate formulas in cell A1

    Green formula =A1>TODAY()-30 Format Fill green
    Red formula =A1<TODAY()-30 Format Fill Red

    Copy cell A1 and Paste Special - Formats to all other Produkt dates

    All produkt older than 30 days will hightlight red and less 30 days in green


    /LGS
    Attached Files Attached Files
    Last edited by LARS GULYAS; 01-03-2024 at 10:03 AM.

  6. #6
    Registered User
    Join Date
    04-13-2022
    Location
    Kristianstad, Sweden
    MS-Off Ver
    2007/2016
    Posts
    21

    Re: Today Statement

    New formulas:
    Use Conditional Formatting,
    "Use a formula to determine which cells to format"
    For example if You have Product 1 date in cell A1
    All products older than 30 days will hightlight red and less 30 days in green,Today in yellow.

    Put 3 separate formulas in cell A1
    Today formula =INT(A1)=TODAY()
    Green formula =AND(A1>TODAY()-30,ISNUMBER(A1))
    Red formula =AND(A1<TODAY()-30,ISNUMBER(A1))
    Date is actually a number so adding ISNUMBER filters out text and empty cells

    Copy cell A1 and Paste Special - Formats to all other Product dates


    /LGS
    Attached Files Attached Files

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. [SOLVED] IF Statement Formulas with TODAY() and times
    By makaveeti in forum Excel General
    Replies: 4
    Last Post: 03-16-2022, 06:48 PM
  2. [SOLVED] If statement with embedded Today() formula
    By Wozmatic in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 01-19-2021, 09:32 AM
  3. [SOLVED] If Statement using Today()
    By Lewisdavies94 in forum Excel Formulas & Functions
    Replies: 1
    Last Post: 08-04-2020, 10:01 AM
  4. Replies: 2
    Last Post: 04-28-2020, 09:22 AM
  5. Getting VBA IF statement to behave correctly with =TODAY()
    By Dylan87 in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 12-01-2015, 12:43 PM
  6. [SOLVED] If Statement for today being more than (x) days from cell value.
    By Sc0tt1e in forum Excel Formulas & Functions
    Replies: 4
    Last Post: 12-18-2013, 07:49 AM
  7. Today Statement ignoring blank
    By safisam in forum Excel General
    Replies: 2
    Last Post: 04-23-2009, 10:01 AM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1