+ Reply to Thread
Results 1 to 3 of 3

Trying to manually fix defective dates

  1. #1
    Forum Contributor
    Join Date
    10-16-2012
    Location
    Brooklyn
    MS-Off Ver
    Excel 2010 PC
    Posts
    137

    Trying to manually fix defective dates

    Hi.
    I have a problem with the date data I'm receiving. Some of the dates have years from the 1900's when they all should be 2000's. What I'm trying to do to fix this is break the date column ("E:E") apart into different helper columns, split the year into two parts([19 & 37] or [20 & 12] for example), then replace all of the "19's" with "20's"- then concatenate the dates back together.

    I'm trying to do this by looping through each worksheet in my workbook and doing all of the concatenations and separations using .formula.
    I think I'm in over my head. This is what I've so far: The date column is originally in Column ("E:E") and I'm inserting three helper columns to the right of ("E:E"), making the date column eventually be H:H. I'll delete ("E:G") after I've created the new, fixed dates, in ("H:H").

    Can any one help me out here?

    Please Login or Register  to view this content.
    Any help is greatly appreciated

    (Edit) I've attached a sample problem as per suggestion. I'm also going to try adding to the 1900 number dates.
    Attached Files Attached Files
    Last edited by Trevasaurus; 12-16-2013 at 04:08 PM. Reason: Attach sample problem

  2. #2
    Forum Moderator alansidman's Avatar
    Join Date
    02-02-2010
    Location
    Steamboat Springs, CO
    MS-Off Ver
    MS Office 365 Version 2403 Win 11 Home 64 Bit
    Posts
    23,810

    Re: Trying to manually fix defective dates

    It would be really helpful if you uploaded a sample of your data in a spreadsheet. That way, the code can be tested to ensure workability.

    Attach a sample workbook. Make sure there is just enough data to make it clear what is needed. Include a BEFORE sheet and an AFTER sheet in the workbook if needed to show the process you're trying to complete or automate. Make sure your desired results are demonstrated, mock them up manually if needed. Remember to desensitize the data.

    Click on GO ADVANCED and use the paperclip icon to open the upload window.

    View Pic
    Alan עַם יִשְׂרָאֵל חַי


    Change an Ugly Report with Power Query
    Database Normalization
    Complete Guide to Power Query
    Man's Mind Stretched to New Dimensions Never Returns to Its Original Form

  3. #3
    Forum Expert martindwilson's Avatar
    Join Date
    06-23-2007
    Location
    London,England
    MS-Off Ver
    office 97 ,2007
    Posts
    19,320

    Re: Trying to manually fix defective dates

    since excel assumes(wrongly) that 1900 was a leap year you could just add 36525
    to all your 1900 dates and since you are using a mac which starts from 1904 probably you can still just add 36525
    Last edited by martindwilson; 12-16-2013 at 02:20 PM.
    "Unless otherwise stated all my comments are directed at OP"

    Mojito connoisseur and now happily retired
    where does code go ?
    look here
    how to insert code

    how to enter array formula

    why use -- in sumproduct
    recommended reading
    wiki Mojito

    how to say no convincingly

    most important thing you need
    Martin Wilson: SPV
    and RSMBC

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. Want to change the dates in selected cells manually using a MACRO
    By e4excel in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 12-07-2013, 03:22 AM
  2. Want to change the dates in selected cells manually using a MACRO
    By e4excel in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 12-04-2013, 02:12 PM
  3. Replies: 2
    Last Post: 10-11-2012, 04:49 PM
  4. Replies: 5
    Last Post: 06-21-2011, 09:10 AM
  5. Defective Formulas
    By Pipestew in forum Excel General
    Replies: 1
    Last Post: 12-03-2007, 02:02 PM

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