Results 1 to 3 of 3
  1. #1
    2 Star Lounger
    Join Date
    Mar 2001
    Location
    Minnesota, USA
    Posts
    134
    Thanks
    0
    Thanked 0 Times in 0 Posts

    IF function with date as logical test (Excel 2000)

    One of our folks is trying to create an IF statement with a specific date and it isn't working. For example, the function might say:
    =IF(A1>12/31/2000,"Y","N")
    If instead of 12/31/2000, I use a cell reference to a cell with that date in it, it works. When I enter the date in the function it doesn't work. He says he has tried many different date formats. What are we missing here? Your help is appreciated!
    Karnie
    Karnie Moesenthin
    Technical Training and Development Professional
    Legal Industry

  2. #2
    Plutonium Lounger
    Join Date
    Mar 2002
    Posts
    84,353
    Thanks
    0
    Thanked 29 Times in 29 Posts

    Re: IF function with date as logical function (Excel 2000)

    12/31/2000 is not seen as a date, but as a calculation (division). Use either DATEVALUE("12/31/2000") or DATE(2000,12,31) instead of plain 12/31/2000. For example:

    IF(A1>DATEVALUE("12/31/2000"),"Y","N")

  3. #3
    Star Lounger
    Join Date
    Feb 2003
    Posts
    89
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: IF function with date as logical test (Excel 2000)

    Another option,

    =IF(A1>"12/31/2000"+0,"Y","N")

    You need to coerce the "text date" in your formula to a true date value.

Posting Permissions

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