+ Reply to Thread
Results 1 to 6 of 6

Errors in IF Statement when using a copied date.

  1. #1
    Registered User
    Join Date
    08-23-2012
    Location
    El Segundo, CA
    MS-Off Ver
    Excel 2007
    Posts
    3

    Errors in IF Statement when using a copied date.

    I have a column of dates that are a v-lookup. I copied that column to a new column using the paste special and values. I tried using that column (s) in an if statement but getting incorrect results.

    I tried =IF(S8="","TTL",IF(S8<=$F$1,"NA","x")) where F1 is a date that I'm comparing to. I get x in my results even where the date in column S is less than F1.

    I tried various options that I see on the forums including:
    =IF(S8<"10/01/2011"+0,"NA","x")
    and
    =IF(S8<=DATE(2011,9,30),"NA","x")
    each with the same result. However, If I manually type the date in column S it come out with the correct results.

    There are too many rows to manually type this and we want to re-use the spreadsheet over and over.
    Can someone help me with this?
    Thanks!
    Last edited by jjenk; 08-23-2012 at 07:16 PM. Reason: mis typed

  2. #2
    Forum Moderator vlady's Avatar
    Join Date
    09-22-2011
    Location
    Philippines - OLSHCO -Guimba-Nueva Ecija
    MS-Off Ver
    2021
    Posts
    4,366

    Re: Errors in IF Statement when using a copied date.

    two questions..

    when you click a cell in Column S what is in the formula bar?
    when you click in column F1 what is in the formula bar?
    I think people forget the word "THANK YOU!!!!" Do you still know it???

    There is a little star ( ADD REPUTATION ) below those person who helped you. Click it to say your "PRIVATE APPRECIATION TO THEIR EFFORT ON THEIR CONTRIBUTIONS "

    Regards,
    Vladimir

  3. #3
    Registered User
    Join Date
    08-23-2012
    Location
    El Segundo, CA
    MS-Off Ver
    Excel 2007
    Posts
    3

    Re: Errors in IF Statement when using a copied date.

    I only see the date in both S and F1. for instance S8 shows 9/24/2010. F1 shows 9/30/2011.

  4. #4
    Forum Moderator vlady's Avatar
    Join Date
    09-22-2011
    Location
    Philippines - OLSHCO -Guimba-Nueva Ecija
    MS-Off Ver
    2021
    Posts
    4,366

    Re: Errors in IF Statement when using a copied date.

    i suspect that the copied dates are text - not really dates.
    you can do a text-to-column in column S
    text-to-column
    delimeted
    next
    date - choose - MDY
    click OK

  5. #5
    Registered User
    Join Date
    08-23-2012
    Location
    El Segundo, CA
    MS-Off Ver
    Excel 2007
    Posts
    3

    Re: Errors in IF Statement when using a copied date.

    You were correct, that worked perfectly. Thanks!

  6. #6
    Forum Moderator vlady's Avatar
    Join Date
    09-22-2011
    Location
    Philippines - OLSHCO -Guimba-Nueva Ecija
    MS-Off Ver
    2021
    Posts
    4,366

    Re: Errors in IF Statement when using a copied date.

    you are very much welcome.
    if you encounter other problems please do post here.

    may i request you to mark this thread "SOLVED" if no further question.

    go to your first post, click edit then follow the steps -look below my signature.

    thanks for your time.

    regards,
    vladimir

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Tags for this Thread

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