+ Reply to Thread
Results 1 to 8 of 8

Date/Timestamp after pasting table not auto updating

  1. #1
    Registered User
    Join Date
    08-16-2012
    Location
    USA
    MS-Off Ver
    Excel 2007
    Posts
    10

    Date/Timestamp after pasting table not auto updating

    My ERP spits out a file with the table on it, then I copy the columns and paste into my existing excel file where I use the values from the table. Table is A1:J95, trying to record a timestamp at L2

    I've tried a couple solutions, but they all fail to update when the whole table is pasted and I'm puzzled.
    However, If I copy and paste individual cells, all methods work. Even if I copy A2 and paste into A2, the timestamp will update for all methods.
    I've tried the circular reference method and a VBA code pasted below.

    Background about this workflow:
    The entire table gets pasted over
    I only need 1 timestamp to record when this overwrite takes place
    Columns A-C values won't change, the rest of the columns are inventory counts which may or may not change.
    The rows are different part numbers

    Please Login or Register  to view this content.

  2. #2
    Registered User
    Join Date
    08-16-2012
    Location
    USA
    MS-Off Ver
    Excel 2007
    Posts
    10

    Re: Date/Timestamp after pasting table not auto updating

    Does anyone have any insight?

  3. #3
    Forum Contributor
    Join Date
    11-20-2007
    Location
    Felixstowe, England
    MS-Off Ver
    Excel 2013, 2019
    Posts
    217

    Re: Date/Timestamp after pasting table not auto updating

    You say the entire table gets pasted over? How ... manually?

  4. #4
    Registered User
    Join Date
    08-16-2012
    Location
    USA
    MS-Off Ver
    Excel 2007
    Posts
    10

    Re: Date/Timestamp after pasting table not auto updating

    Yes, I do it manually.

    File "A" gets generated with the table A1:J95
    I highlight the columns from A-J and copy.

    Then I go to File "B" and manually paste the table on cell A1 and it overwrites everything that was there on A1:J95.

    That VBA code is supposed to put a date/timestamp on column L if column A is updated. For example, if A2 is overwritten, L2 will have a date/timestamp for that overwrite. If A15 is overwritten, L15 will have a date/timestamp for that overwrite.
    However, when I copy and paste the whole table, it doesn't update the date/timestamp.
    The VBA code does work though, If I just copy A2 and paste into A2, then it will update the timestamp on L2.

    For some reason when I copy and paste the whole table, A2 doesn't think that it was overwritten and it doesn't update the date/timestamp.

  5. #5
    Forum Contributor
    Join Date
    11-20-2007
    Location
    Felixstowe, England
    MS-Off Ver
    Excel 2013, 2019
    Posts
    217

    Re: Date/Timestamp after pasting table not auto updating

    I did a very quick test ... when you copy and paste a range it only updates the timestamp on the first row pasted. In fact, looking at the code, there is nothing in there to test and process for Target being a range instead of a cell.

  6. #6
    Forum Guru
    Join Date
    08-05-2004
    Location
    NJ
    MS-Off Ver
    365
    Posts
    13,582

    Re: Date/Timestamp after pasting table not auto updating

    It would help if you uploaded an example spreadsheet showing what and where you are copying and pasting so we can better understand what you expect to happen.
    ChemistB
    My 2?

    substitute commas with semi-colons if your region settings requires
    Don't forget to mark threads as "Solved" (Edit First post>Advanced>Change Prefix)
    If I helped, Don't forget to add to my reputation (click on the little star at bottom of this post)

    Forum Rules: How to use code tags, mark a thread solved, and keep yourself out of trouble

  7. #7
    Registered User
    Join Date
    08-16-2012
    Location
    USA
    MS-Off Ver
    Excel 2007
    Posts
    10

    Re: Date/Timestamp after pasting table not auto updating

    Files attached and simplified for discussion purpose.

    At the end of the day I only need 1 date/timestamp when I paste the whole table to file B.
    I picked up the VBA code somewhere online and it sort of works, but not completely.

    The code is fairly simple, if anything in column A is overwritten, then it puts a timestamp in column L when that happens.
    It just doesn't update the timestamp if you paste the whole table which is how I use that sheet in File B.
    Attached Files Attached Files

  8. #8
    Registered User
    Join Date
    08-16-2012
    Location
    USA
    MS-Off Ver
    Excel 2007
    Posts
    10

    Re: Date/Timestamp after pasting table not auto updating

    I was able to get it to work using this VBA code.
    Now when I paste in the entire table, it gives a timestamp in L1.
    It doesn't care if anything changed, just the fact that it is overwritten changes the timestamp which is good for me.


    Please Login or Register  to view this content.

+ 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: 3
    Last Post: 01-31-2020, 01:16 PM
  2. Macro for updating 2 columns timestamp
    By JorgeP in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 03-15-2016, 11:00 AM
  3. [SOLVED] VBA - Convert Date/Timestamp into American Date and Military Timestamp
    By ryanmorris in forum Excel Programming / VBA / Macros
    Replies: 9
    Last Post: 05-01-2015, 03:43 PM
  4. Auto updating table from another worksheet
    By clemsoncooz in forum Excel Programming / VBA / Macros
    Replies: 7
    Last Post: 05-25-2013, 04:04 AM
  5. Auto-updating date log
    By EI-ALEX in forum Excel General
    Replies: 4
    Last Post: 02-16-2010, 12:14 PM
  6. Auto updating a table
    By phil2006 in forum Excel General
    Replies: 1
    Last Post: 06-07-2006, 01:15 PM
  7. PLEASE HELP** Pivot table auto updating
    By marthasanchez in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 05-12-2006, 06:10 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