+ Reply to Thread
Results 1 to 7 of 7

Date comparison

  1. #1
    Registered User
    Join Date
    12-01-2004
    Location
    Westland, New Zealand
    Posts
    57

    Date comparison

    I have a list of items which have expiry dates. I want these dates compared to the current date every day, and some sort of formatting applied when they are due this month, or overdue. I believe this can be done with conditional formatting (which I have used before), but I don't know how to construct the formula to compare each cell to the present date.

    Jonathan

  2. #2
    Fred
    Guest

    RE: Date comparison

    use today() function to get current date.
    use it in the conditional format box or use an extra column to flag the due
    dates.
    Say your date is in A1. Let B1 be IF(A1>=TODAY();"1";"").

    "Jonibenj" escreveu:

    >
    > I have a list of items which have expiry dates. I want these dates
    > compared to the current date every day, and some sort of formatting
    > applied when they are due this month, or overdue. I believe this can
    > be done with conditional formatting (which I have used before), but I
    > don't know how to construct the formula to compare each cell to the
    > present date.
    >
    > Jonathan
    >
    >
    > --
    > Jonibenj
    > ------------------------------------------------------------------------
    > Jonibenj's Profile: http://www.excelforum.com/member.php...o&userid=17048
    > View this thread: http://www.excelforum.com/showthread...hreadid=478095
    >
    >


  3. #3
    Ron Rosenfeld
    Guest

    Re: Date comparison

    On Thu, 20 Oct 2005 19:35:35 -0500, Jonibenj
    <Jonibenj.1x89eb_1129856703.1924@excelforum-nospam.com> wrote:

    >
    >I have a list of items which have expiry dates. I want these dates
    >compared to the current date every day, and some sort of formatting
    >applied when they are due this month, or overdue. I believe this can
    >be done with conditional formatting (which I have used before), but I
    >don't know how to construct the formula to compare each cell to the
    >present date.
    >
    >Jonathan


    Format/Condtional Formatting

    Cell Value Is: Less Than =TODAY()-30

    as an example.


    --ron

  4. #4
    Registered User
    Join Date
    12-01-2004
    Location
    Westland, New Zealand
    Posts
    57
    What goes in the brackets after 'TODAY'? I can't make this work!

  5. #5
    Ron Rosenfeld
    Guest

    Re: Date comparison

    On Fri, 21 Oct 2005 17:36:35 -0500, Jonibenj
    <Jonibenj.1x9yib_1129935909.1862@excelforum-nospam.com> wrote:

    >
    >What goes in the brackets after 'TODAY'? I can't make this work!
    >


    Nothing goes in the brackets after TODAY().

    I don't know what you mean by "can't make this work".

    Let me lead you through it step by step.

    Try this on a new sheet:

    A1: 1 Sep 2005

    With A1 still selected, from the main menu select

    Format/Conditional Formatting

    In the first box of this dialog box select
    Cell Value Is

    In the adjacent box select
    Less than

    In the next adjacent box, enter the formula
    =TODAY()-30

    Then select Format
    On the Font Tab select Bold; and the color Red

    Then
    OK
    OK
    should close the box and you should see A1 formatted in bold red.

    You should be able to adapt this process to fit your needs. As written, the
    cell contents will become RED and BOLD if the date in the box is more than 30
    days before today. So if the date represents the DATE DUE, then it will turn
    red when it is 30 days old.

    Obviously you can change the condition if you want it flagged for other
    circumstances.


    --ron

  6. #6
    Registered User
    Join Date
    12-01-2004
    Location
    Westland, New Zealand
    Posts
    57
    Thanks very much Ron, I'm a bit thick sometimes!

    Jonathan

  7. #7
    Ron Rosenfeld
    Guest

    Re: Date comparison

    On Sun, 23 Oct 2005 12:33:55 -0500, Jonibenj
    <Jonibenj.1xd9yc_1130090703.3236@excelforum-nospam.com> wrote:

    >Thanks very much Ron, I'm a bit thick sometimes!
    >
    >Jonathan


    It's not being thick. Just that sometimes it's much easier to see someone do
    something, than to read about it. I have that problem, also.

    But glad you've got the information you need.


    --ron

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

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