+ Reply to Thread
Results 1 to 3 of 3

How can I use a date in an IF/AND statement?

  1. #1
    gsmith
    Guest

    How can I use a date in an IF/AND statement?

    Trying to formulate =IF(c2 > 01/31/05, 1,"2") Is there a different date
    format to use?

    Thank you in advance for any help.

  2. #2
    KL
    Guest

    Re: How can I use a date in an IF/AND statement?

    Hi,

    Try this:

    =2-(C2>VALUE("01/31/05"))

    or

    =2-(C2>DATEVALUE("01/31/05"))

    or

    =2-(C2>DATE(2005,1,31))

    or

    =IF(C2>DATE(2005,1,31),1,2)

    etc.

    Regards,
    KL


    "gsmith" <[email protected]> wrote in message
    news:[email protected]...
    > Trying to formulate =IF(c2 > 01/31/05, 1,"2") Is there a different date
    > format to use?
    >
    > Thank you in advance for any help.




  3. #3
    gsmith
    Guest

    Re: How can I use a date in an IF/AND statement?

    Yahoo - that was exactly what I needed. Thank you KL!!

    "KL" wrote:

    > Hi,
    >
    > Try this:
    >
    > =2-(C2>VALUE("01/31/05"))
    >
    > or
    >
    > =2-(C2>DATEVALUE("01/31/05"))
    >
    > or
    >
    > =2-(C2>DATE(2005,1,31))
    >
    > or
    >
    > =IF(C2>DATE(2005,1,31),1,2)
    >
    > etc.
    >
    > Regards,
    > KL
    >
    >
    > "gsmith" <[email protected]> wrote in message
    > news:[email protected]...
    > > Trying to formulate =IF(c2 > 01/31/05, 1,"2") Is there a different date
    > > format to use?
    > >
    > > Thank you in advance for any help.

    >
    >
    >


+ 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