Results 1 to 3 of 3

Using Formulas with Dates

Threaded View

nosenga Using Formulas with Dates 01-13-2011, 01:20 PM
zbor Re: Using Formulas with Dates 01-13-2011, 01:27 PM
nosenga Re: Using Formulas with Dates 01-13-2011, 01:33 PM
  1. #1
    Registered User
    Join Date
    01-13-2011
    Location
    Colorado, USA
    MS-Off Ver
    Excel 2007
    Posts
    6

    Using Formulas with Dates

    This should be easy, simple, basic, but I can't figure out why it's not working.

    In A1 I have: =TODAY()
    In A2 I have: =IF(A1>="1/1/2011",1,0)
    A1 returns 1/13/2011, which is correct, todays date.
    A2 returns 0. WHY? Clearly A1>1/1/2011 right?


    I've worked it a bit and have found that if:

    In A2 I have: =IF(A1>=1/1/2011,1,0) (removed the quotations)
    A2 returns 1, which is correct.

    Keeping A1 the same:
    In A2 I have: =IF(A1>=2/1/2011,1,0) (no quotations, greater than February)
    A2 returns 0, which is incorrect.
    Adding the quotations back in, A2 returns 1, which is correct.

    Maybe I'm confused as to when to use quotations and when to not. Without quotations it should just be calculating the value of 1/1/2011, which is a very small number. With the quotations, I thought it should be comparing actual dates.
    Last edited by nosenga; 01-13-2011 at 01:33 PM. Reason: Solved

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