+ Reply to Thread
Results 1 to 15 of 15

The workbook you are pasting to uses a different date system

  1. #1
    Forum Contributor
    Join Date
    09-16-2013
    Location
    Los Angeles, USA
    MS-Off Ver
    Excel 2011
    Posts
    620

    The workbook you are pasting to uses a different date system

    I am starting to get an error saying 'The workbook you are pasting to uses a different date system' when using a create PDF/email macro. I have noticed that the date fields on the PDFs created a 4 years and 1 day off from the dates on the spreadsheet. The error gives me the option of Convert or Dont Convert, but either way it changes all the dates to 4 years back. How can I fix this.
    Thanks.

    Code:

    Please Login or Register  to view this content.

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

    Re: The workbook you are pasting to uses a different date system

    i would think its because mac uses 1904 date system you probably need to make the excel sheet use the same system in options
    "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

  3. #3
    Forum Moderator - RIP Richard Buttrey's Avatar
    Join Date
    01-14-2008
    Location
    Stockton Heath, Cheshire, UK
    MS-Off Ver
    Office 365, Excel for Windows 2010 & Excel for Mac
    Posts
    29,464

    Re: The workbook you are pasting to uses a different date system

    Hi,

    Because you're using a Mac your default base date system is January 1st 1904. The standard used by Windows is Jan 1st 1900. It's all explained here http://support.microsoft.com/kb/180162

    Change your Excel system date as described in the article.
    Richard Buttrey

    RIP - d. 06/10/2022

    If any of the responses have helped then please consider rating them by clicking the small star icon below the post.

  4. #4
    Forum Contributor
    Join Date
    09-16-2013
    Location
    Los Angeles, USA
    MS-Off Ver
    Excel 2011
    Posts
    620

    Re: The workbook you are pasting to uses a different date system

    I deselected the Use 1904 Date System, which changed all my dates. I then manually changed them all back to what they should be and it seems to have fixed it, however i have since come across another issue. Since clicking convert on that Date Error message it appears to have messed up my record search. I have attached my spreadsheet. On the Search sheet towards the bottom at the end of the records it has added all these other records which are identical. In one of the columns it has changed all the data to the date 01/00/00 (a column that was never a date to begin with) which is really strange. How can I undo this?
    Attached Files Attached Files

  5. #5
    Forum Moderator - RIP Richard Buttrey's Avatar
    Join Date
    01-14-2008
    Location
    Stockton Heath, Cheshire, UK
    MS-Off Ver
    Office 365, Excel for Windows 2010 & Excel for Mac
    Posts
    29,464

    Re: The workbook you are pasting to uses a different date system

    Hi,

    I assume you're referring to column E.

    The whole of column E is formatted as Dates. Why I've no idea since as you say there will never be dates in here. However it's fact that they are so formatted.

    What you're seeing is simply the VLOOKUP returning the values zero since for example in E297 the A290 value inReturnData! does not exist in ReturnData! column B.

    Just format column E as General.

  6. #6
    Forum Contributor
    Join Date
    09-16-2013
    Location
    Los Angeles, USA
    MS-Off Ver
    Excel 2011
    Posts
    620

    Re: The workbook you are pasting to uses a different date system

    I changed the column to general, which changed the dates to 0, however the repeated records still appear. In the current state rows 297 on should be blank (since there are not that many records), but its adding those duplicated records for some reason.

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

    Re: The workbook you are pasting to uses a different date system

    that's because its matching "" with "" in returndata b287

  8. #8
    Forum Contributor
    Join Date
    09-16-2013
    Location
    Los Angeles, USA
    MS-Off Ver
    Excel 2011
    Posts
    620

    Re: The workbook you are pasting to uses a different date system

    It didnt used to do this. How can I fix it?

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

    Re: The workbook you are pasting to uses a different date system

    well you couldnt have had "" in there because it will match change one of the iferrors to 0 or - or " " instead of ""

  10. #10
    Forum Contributor
    Join Date
    09-16-2013
    Location
    Los Angeles, USA
    MS-Off Ver
    Excel 2011
    Posts
    620

    Re: The workbook you are pasting to uses a different date system

    I got the formulas from from Matt Paul on youtube: http://www.youtube.com/watch?v=Tr8Rwh8h1xM
    It worked flawlessly until the date base issue can up, and all these extra records appeared.

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

    Re: The workbook you are pasting to uses a different date system

    well "" will match see attached
    Attached Files Attached Files

  12. #12
    Forum Contributor
    Join Date
    09-16-2013
    Location
    Los Angeles, USA
    MS-Off Ver
    Excel 2011
    Posts
    620

    Re: The workbook you are pasting to uses a different date system

    Im not quite sure what I should change?

  13. #13
    Forum Contributor
    Join Date
    09-16-2013
    Location
    Los Angeles, USA
    MS-Off Ver
    Excel 2011
    Posts
    620

    Re: The workbook you are pasting to uses a different date system

    It seems to be because the cells are returning 0 when no data is found. How can I keep it blank, maybe that will fix it?

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

    Re: The workbook you are pasting to uses a different date system

    you could change return data a7 to
    =IFERROR(IF($D7="", " ", $A6+1), "")

  15. #15
    Forum Contributor
    Join Date
    09-16-2013
    Location
    Los Angeles, USA
    MS-Off Ver
    Excel 2011
    Posts
    620

    Re: The workbook you are pasting to uses a different date system

    Awesome, that fixed it. Thank you.

+ 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. Replies: 5
    Last Post: 10-02-2013, 09:49 AM
  2. Change active cell when pasting date from another workbook
    By JBlam in forum Excel Programming / VBA / Macros
    Replies: 7
    Last Post: 04-12-2013, 04:33 AM
  3. System auto prompt due date when workbook is open
    By cyee in forum Excel Programming / VBA / Macros
    Replies: 6
    Last Post: 06-28-2011, 09:25 PM
  4. using Calendar form to store a date changes my system date/time
    By mslynng in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 11-16-2009, 02:08 PM
  5. Replies: 8
    Last Post: 08-22-2009, 10:03 AM

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