+ Reply to Thread
Results 1 to 4 of 4

Month and Date only Comparison?

  1. #1
    Forum Contributor
    Join Date
    10-04-2006
    Posts
    151

    Month and Date only Comparison?

    Hello Once More...

    Is it possible to compare only the month and the day of formulas? For example,

    I have a date in a1: 5/4/1984

    The idea is to show the value as true if the month and day are greater than todays month and day and show False if the opposite occurs.

    I have this formula but it doesn't work.

    =IF(MONTH(A1)&DAY(A1)>=DAY(TODAY()+1)&MONTH(TODAY()+1),"True","False")

    It still comes up value as true even though the month and day have passed.

  2. #2
    Valued Forum Contributor
    Join Date
    09-07-2006
    Posts
    520
    One way

    Place in B1:
    =IF(A1="","",AND(MONTH(A1)>=MONTH(TODAY()),DAY(A1)>=DAY(TODAY())))
    Copy B1 down as far as required
    Max
    Singapore

  3. #3
    Forum Expert daddylonglegs's Avatar
    Join Date
    01-14-2006
    Location
    England
    MS-Off Ver
    2016
    Posts
    14,675
    Quote Originally Posted by NewExcelUser
    The idea is to show the value as true if the month and day are greater than todays month and day and show False if the opposite occurs.
    Max's suggestion does exactly what you ask, because today is 29th April, it'll only give TRUE if the month is April to December and the day is 29th - 31st, e.g. it'll give TRUE for 31st May but FALSE for 1st June. If you just want TRUE for a date of 29th April or later, no matter what year, try

    =DATE(YEAR(TODAY()),MONTH(A1),DAY(A1))>=TODAY()

  4. #4
    Forum Contributor
    Join Date
    10-04-2006
    Posts
    151

    Wow

    Brilliant! Absolutely Brilliant! Exactly what I was looking for. This works perfect. You guys are great. Thanks a million.

+ 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