+ Reply to Thread
Results 1 to 9 of 9

Excel date formula 2000 vs. 1900 conditional

  1. #1
    Registered User
    Join Date
    09-28-2011
    Location
    Chicago, Illinois
    MS-Off Ver
    Excel 2007
    Posts
    38

    Excel date formula 2000 vs. 1900 conditional

    I have a database of about 7000 dates, most of which are 19xx, so when I converted to the 4 digit year, it asked me if I wanted to convert it to 1900 or 2000 and I chose 1900. Well, I still have some 2000s that I need to take care of. They are noted by the adjacent column which let me know it is 2000 instead of 1900. So, what I'd like to do is a formula or something that says if the adjacent column is 20**, then this column is 20** or something like that.

    I've attached a document. So basically, column B is the "real" year, but column A has the full date.

    So =IF(b2=20**, a2=**/**/20**) or something like that. If b2 is not 20**, then no change.
    Attached Files Attached Files
    Last edited by sabrinigreen; 11-06-2012 at 08:41 AM.

  2. #2
    Forum Expert Jakobshavn's Avatar
    Join Date
    08-17-2012
    Location
    Lakehurst, NJ, USA
    MS-Off Ver
    Excel 2007
    Posts
    1,970

    Re: Excel date formula 2000 vs. 1900 conditional

    In C3 enter:

    =IF(B3>1999,DATE(B3,MONTH(A3),DAY(A3)),A3) and format as Date. Then copy down.
    Gary's Student

  3. #3
    Registered User
    Join Date
    09-28-2011
    Location
    Chicago, Illinois
    MS-Off Ver
    Excel 2007
    Posts
    38

    Re: Excel date formula 2000 vs. 1900 conditional

    Okay, that works pretty well except for the entries that have ONLY four digit years. Then it changes it to something else entirely.
    Is there any way to get around those odd ball ones?

    Thank you.

  4. #4
    Forum Expert Jakobshavn's Avatar
    Join Date
    08-17-2012
    Location
    Lakehurst, NJ, USA
    MS-Off Ver
    Excel 2007
    Posts
    1,970

    Re: Excel date formula 2000 vs. 1900 conditional

    I don't see the problem on the data you posted??

    Give us an example of the problem data......................

  5. #5
    Registered User
    Join Date
    09-28-2011
    Location
    Chicago, Illinois
    MS-Off Ver
    Excel 2007
    Posts
    38

    Re: Excel date formula 2000 vs. 1900 conditional

    Ah, it looks like the four digit years have been stored as text in most cases. I can just manually adjust those that aren't, but I would like to know the answer because I have a feeling this will come up again. Thank you.

  6. #6
    Registered User
    Join Date
    09-28-2011
    Location
    Chicago, Illinois
    MS-Off Ver
    Excel 2007
    Posts
    38

    Re: Excel date formula 2000 vs. 1900 conditional

    Sorry about that, didn't include the odd balls in my example. Here it is.
    Attached Files Attached Files

  7. #7
    Forum Expert Jakobshavn's Avatar
    Join Date
    08-17-2012
    Location
    Lakehurst, NJ, USA
    MS-Off Ver
    Excel 2007
    Posts
    1,970

    Re: Excel date formula 2000 vs. 1900 conditional

    O.K.

    Enter the number 1 in an unused cell. Copy this cell. Select the Years data and then PasteSpecial/Multiply.
    This will convert any Text Years into Numbers.

  8. #8
    Registered User
    Join Date
    09-28-2011
    Location
    Chicago, Illinois
    MS-Off Ver
    Excel 2007
    Posts
    38

    Re: Excel date formula 2000 vs. 1900 conditional

    Thank you.

  9. #9
    Forum Expert Jakobshavn's Avatar
    Join Date
    08-17-2012
    Location
    Lakehurst, NJ, USA
    MS-Off Ver
    Excel 2007
    Posts
    1,970

    Re: Excel date formula 2000 vs. 1900 conditional

    Then try this:

    =IF(CELL("format",A3)<>"D4",DATE(A3,1,1),IF(B3>1999,DATE(B3,MONTH(A3),DAY(A3)),A3))

+ 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