+ Reply to Thread
Results 1 to 7 of 7

IF statements using DATES

Hybrid View

  1. #1
    Registered User
    Join Date
    04-12-2007
    Posts
    4

    IF statements using DATES

    Hello to all,

    I am trying to use the IF forumla to see if the date in a cell is greter than or less than another date.

    example
    A1 =01/02/2007

    I want to use an IF command to that says IF(A1<01/03/2007,OK, NOT OK)
    however it always returns NOT OK.

    Any ideas?
    Thanks in advance.

  2. #2
    Forum Expert daddylonglegs's Avatar
    Join Date
    01-14-2006
    Location
    England
    MS-Off Ver
    Microsoft 365
    Posts
    14,726
    Try

    =IF(A1<"01/03/2007"+0,"OK", "NOT OK")

    or

    =IF(A1<DATE(2007,1,3),"OK", "NOT OK")

  3. #3
    Registered User
    Join Date
    04-12-2007
    Posts
    4
    perfect.

    thank you.

    how about one more.
    How would I go about checking the cell to see what month it is and putting out a result.

    example
    the "A" column has dates.
    I want the B column to tell me what month is in text form.

    so.. if a1 is in the range of 01/02/2007 to 28/02/2007 then B1 = FEBRUARY
    Last edited by tttt; 04-12-2007 at 09:00 PM.

  4. #4
    Forum Expert Paul's Avatar
    Join Date
    02-05-2007
    Location
    Wisconsin
    MS-Off Ver
    2016/365
    Posts
    6,887
    In B1, use:

    =TEXT(MONTH(A1),"mmmm")

  5. #5
    Registered User
    Join Date
    04-12-2007
    Posts
    4
    Quote Originally Posted by pjoaquin
    In B1, use:

    =TEXT(MONTH(A1),"mmmm")
    That seems to display "January" no matter what date is in A1

  6. #6
    Forum Expert Paul's Avatar
    Join Date
    02-05-2007
    Location
    Wisconsin
    MS-Off Ver
    2016/365
    Posts
    6,887
    That's probably because I was temporarily stupid.

    Try this instead:

    =TEXT(A1,"mmmm")

+ 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