+ Reply to Thread
Results 1 to 13 of 13

Timestamp copy and Stack

  1. #1
    Forum Contributor
    Join Date
    01-25-2021
    Location
    Atlanta, Georgia
    MS-Off Ver
    365
    Posts
    144

    Timestamp copy and Stack

    I have a table "UserSheet" which allows users to use dropdown to trigger a timestamp. I would like a code that would copy table data and paste it to the bottom of another table "TimeStampedOutput". Purpose of this is to create a timestamp log of all entries from each update. Not sure if this is too complex of an ask......
    Attached Files Attached Files

  2. #2
    Forum Expert
    Join Date
    02-11-2014
    Location
    New York
    MS-Off Ver
    Excel 365 (Windows)
    Posts
    5,945

    Re: Timestamp copy and Stack

    Try this code:

    Please Login or Register  to view this content.
    Bernie Deitrick
    Excel MVP 2000-2010

  3. #3
    Forum Contributor
    Join Date
    01-25-2021
    Location
    Atlanta, Georgia
    MS-Off Ver
    365
    Posts
    144

    Re: Timestamp copy and Stack

    How can I modify it so to run in from another workbook? So will need to reference to workbook, sheet and table to another sheet & table.

  4. #4
    Forum Expert
    Join Date
    02-11-2014
    Location
    New York
    MS-Off Ver
    Excel 365 (Windows)
    Posts
    5,945

    Re: Timestamp copy and Stack

    You would do it like this:

    Please Login or Register  to view this content.

  5. #5
    Forum Contributor
    Join Date
    01-25-2021
    Location
    Atlanta, Georgia
    MS-Off Ver
    365
    Posts
    144

    Re: Timestamp copy and Stack

    I was trying to recreate your code in my actual workbooks but was unable to. Please see attached and let me know what I am doing wrong.

    "UserSheet Workbook" is where original data is housed. "Compile Workbook" is where I want data pasted into. "VBA Mission Control" is the workbook I will be running the code from.

    Thank you and my apologies......very new to VBA.
    Attached Files Attached Files
    Last edited by JyothiGrace; 01-23-2023 at 09:03 AM.

  6. #6
    Forum Expert
    Join Date
    02-11-2014
    Location
    New York
    MS-Off Ver
    Excel 365 (Windows)
    Posts
    5,945

    Re: Timestamp copy and Stack

    This should work in VBA Mission Control..... Just one note - your workbook Compile Workbook.xlsm is actually named Compile "Woorkbook".xlsm, with an extra "o" I have removed the extra o in the code - not sure where the typo started - just make sure your workbook name does not have the extra o.

    Please Login or Register  to view this content.

  7. #7
    Forum Contributor
    Join Date
    01-25-2021
    Location
    Atlanta, Georgia
    MS-Off Ver
    365
    Posts
    144

    Re: Timestamp copy and Stack

    Thank you Bernie! Your explanations are very clear and complete. Very helpful! I attempted to apply your codes (with a few modifications) to another series of workbooks that I will be managing for my company but ran into a Run-time error (Application-defined or object-defined error). I believe it may have something to do with the table properties.

    Are you able to ID the error in my code? BTW.....my file paths are all correct.
    Attached Files Attached Files

  8. #8
    Forum Expert
    Join Date
    02-11-2014
    Location
    New York
    MS-Off Ver
    Excel 365 (Windows)
    Posts
    5,945

    Re: Timestamp copy and Stack

    Try this code:

    Please Login or Register  to view this content.

  9. #9
    Forum Contributor
    Join Date
    01-25-2021
    Location
    Atlanta, Georgia
    MS-Off Ver
    365
    Posts
    144

    Re: Timestamp copy and Stack

    That worked perfectly. Thanks Bernie!

    Last question.....

    How can I modify to only copy rows based on a condition? In "Coaching Report - Copy.xlsm", say I only want to copy/paste rows if in column D (SC Name) values equal "Kendal Gholston"?

  10. #10
    Forum Expert
    Join Date
    02-11-2014
    Location
    New York
    MS-Off Ver
    Excel 365 (Windows)
    Posts
    5,945

    Re: Timestamp copy and Stack

    You can apply a filter to your table based on the value you want to show - copy will only copy the visible cells then. Or we can add that to the macro, but if your values change, then it is often easier to just include one manual step.

  11. #11
    Forum Contributor
    Join Date
    01-25-2021
    Location
    Atlanta, Georgia
    MS-Off Ver
    365
    Posts
    144

    Re: Timestamp copy and Stack

    Let me see how it works. Can you please send the VBA still?

  12. #12
    Forum Expert
    Join Date
    02-11-2014
    Location
    New York
    MS-Off Ver
    Excel 365 (Windows)
    Posts
    5,945

    Re: Timestamp copy and Stack

    Try this VBA:

    Please Login or Register  to view this content.

  13. #13
    Forum Contributor
    Join Date
    01-25-2021
    Location
    Atlanta, Georgia
    MS-Off Ver
    365
    Posts
    144

    Re: Timestamp copy and Stack

    It worked on the attached samples but I can't seem to duplicate it on my actual sheets. Thanks however Bernie!

    I will close and open another post.

+ 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: 1
    Last Post: 04-19-2022, 01:42 PM
  2. Copy a range in Next row (with changing timestamp)
    By asngpr in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 06-16-2020, 04:30 PM
  3. Replies: 5
    Last Post: 06-06-2019, 07:51 AM
  4. [SOLVED] Copy Worksheet & Saving With Timestamp
    By holdenhsv33 in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 11-30-2017, 11:42 PM
  5. Replies: 2
    Last Post: 11-09-2016, 02:23 PM
  6. Copy worksheet and timestamp
    By athard in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 12-30-2010, 01:30 PM
  7. [SOLVED] timestamp copy and paste
    By Robert in forum Excel General
    Replies: 0
    Last Post: 08-17-2006, 11:00 AM

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