+ Reply to Thread
Results 1 to 4 of 4

Add timestamp

  1. #1
    Registered User
    Join Date
    04-27-2019
    Location
    Northern Ireland
    MS-Off Ver
    2019
    Posts
    62

    Add timestamp

    I want to add a timestamp each time the following code runs:


    'Data Source
    source.Range("E5:E20").Copy
    'Gets Empty Column
    emptyColumn = destination.Cells(5, destination.Columns.Count).End(xlToLeft).Column
    Application.ScreenUpdating = False

    If IsEmpty(destination.Range("E5")) Then
    destination.Cells(5, 5).PasteSpecial Paste:=xlPasteValues, Operation:=xlNone, SkipBlanks:=False, Transpose:=False
    Else
    emptyColumn = emptyColumn + 1
    destination.Cells(5, emptyColumn).PasteSpecial Paste:=xlPasteValues, Operation:=xlNone, SkipBlanks:=False, Transpose:=False
    End If


    The timestamp would be entered into the cell on row 4 of whichever column data is being pasted into.


    Thanks
    Attached Files Attached Files

  2. #2
    Valued Forum Contributor
    Join Date
    06-22-2018
    Location
    Blackpool, England
    MS-Off Ver
    2019
    Posts
    408

    Re: Add timestamp

    Just add one of these lines to your routine at an appropriate point:
    Please Login or Register  to view this content.
    Tim


    NB In future, don't forget to enclose your code in code tags to improve readability. See forum rule #2 here: https://www.excelforum.com/forum-rul...rum-rules.html
    Never stop learning!
    <--- please consider *-ing !

  3. #3
    Registered User
    Join Date
    04-27-2019
    Location
    Northern Ireland
    MS-Off Ver
    2019
    Posts
    62

    Re: Add timestamp

    Hi Tim,

    Perfecto
    Thanks

    Patrick

  4. #4
    Valued Forum Contributor
    Join Date
    06-22-2018
    Location
    Blackpool, England
    MS-Off Ver
    2019
    Posts
    408

    Re: Add timestamp

    Glad that helped. Please don't forget to mark the thread [SOLVED] using the "Thread Tools" at the top of the page.

    Additionally, you can leave feedback if you feel someone has helped you by clicking the * to the left of their posts.

    Tim

+ 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: 2
    Last Post: 11-09-2016, 02:23 PM
  2. [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
  3. Timestamp
    By scantor145 in forum Excel General
    Replies: 2
    Last Post: 04-23-2015, 01:28 PM
  4. Replies: 18
    Last Post: 02-24-2014, 06:13 PM
  5. Timestamp
    By puffyboy in forum Excel General
    Replies: 1
    Last Post: 12-18-2013, 11:09 PM
  6. When a timestamp doesn't behave as a timestamp
    By mredekopp in forum Excel General
    Replies: 3
    Last Post: 03-07-2011, 03:39 PM
  7. [SOLVED] Now as timestamp
    By Lp12 in forum Excel Formulas & Functions
    Replies: 5
    Last Post: 08-13-2006, 06:35 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