+ Reply to Thread
Results 1 to 6 of 6

Insert static date automatically on pasting large amount of date

  1. #1
    Registered User
    Join Date
    04-15-2016
    Location
    UK
    MS-Off Ver
    2013
    Posts
    3

    Insert static date automatically on pasting large amount of date

    Hi all

    I'm not new to the world of spreadsheets, but very new to the world of VBA. I've only recently started playing around with it to see what it can do.

    One of the things that I would like to do is to insert a static date in to a cell when another cell is updated. I have found the following code on these forums and this works well, provided you are updating one cell at a time manually.

    Please Login or Register  to view this content.
    My requirement is that the cells update after pasting in several lines of data in one go.

    I've found other lines of code for checking for a paste event....

    Please Login or Register  to view this content.
    ...but I am unsure if this is the 'correct' method or even if these can be combined and if they can be combined, how to do this!

    Any help is greatly appreciated!
    Last edited by Toro-; 04-21-2016 at 03:06 AM. Reason: Solved

  2. #2
    Forum Guru xladept's Avatar
    Join Date
    04-14-2012
    Location
    Pasadena, California
    MS-Off Ver
    Excel 2003,2010
    Posts
    12,378

    Re: Insert static date automatically on pasting large amount of date

    Hi Toro,

    Welcome to the Forum!

    What do you mean by Static Date - is it a previous date?
    If I've helped you, please consider adding to my reputation - just click on the liitle star at the left.

    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~(Pride has no aftertaste.)

    You can't do one thing. XLAdept

    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~aka Orrin

  3. #3
    Forum Guru
    Join Date
    07-25-2011
    Location
    Florida
    MS-Off Ver
    Excel 2003
    Posts
    9,643

    Re: Insert static date automatically on pasting large amount of date

    Quote Originally Posted by Toro- View Post
    My requirement is that the cells update after pasting in several lines of data in one go.
    Try this. It puts the date(s) in column B when column A is changed.

    Please Login or Register  to view this content.
    Surround your VBA code with CODE tags e.g.;
    [CODE]your VBA code here[/CODE]
    The # button in the forum editor will apply CODE tags around your selected text.

  4. #4
    Registered User
    Join Date
    04-15-2016
    Location
    UK
    MS-Off Ver
    2013
    Posts
    3

    Re: Insert static date automatically on pasting large amount of date

    Quote Originally Posted by xladept View Post
    Hi Toro,

    Welcome to the Forum!

    What do you mean by Static Date - is it a previous date?
    Thanks

    By static date I mean one that does not change. To be more specific it would insert the date from NOW() or TODAY() but convert this to a static date/time so that when you reload the seet the following day, the date does not change and when more data is inserted, the new date is put in next to it.


    Quote Originally Posted by AlphaFrog View Post
    Try this. It puts the date(s) in column B when column A is changed.

    Please Login or Register  to view this content.
    This appears to have done the trick. Many thanks for your assistance

  5. #5
    Forum Contributor
    Join Date
    06-02-2015
    Location
    delhi
    MS-Off Ver
    2010
    Posts
    104

    Re: Insert static date automatically on pasting large amount of date

    More dynamic try this it will work for copy pasting cells at once also not on single one

    Please Login or Register  to view this content.

  6. #6
    Registered User
    Join Date
    04-15-2016
    Location
    UK
    MS-Off Ver
    2013
    Posts
    3

    Re: Insert static date automatically on pasting large amount of date

    Quote Originally Posted by Toro- View Post
    Thanks

    By static date I mean one that does not change. To be more specific it would insert the date from NOW() or TODAY() but convert this to a static date/time so that when you reload the seet the following day, the date does not change and when more data is inserted, the new date is put in next to it.




    This appears to have done the trick. Many thanks for your assistance
    although having said that... if you change the table range it updates the whole date column, including table header
    Last edited by Toro-; 04-21-2016 at 08:37 AM. Reason: correcting info

+ 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: 02-12-2015, 09:17 PM
  2. Insert current date (static) when cell is clicked?
    By floyd605 in forum Excel General
    Replies: 13
    Last Post: 05-21-2014, 07:56 AM
  3. [SOLVED] Static Date insert based on drop down
    By [email protected] in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 08-07-2012, 02:13 PM
  4. Automatically insert a STATIC date/time if data in adjacent cell
    By BrightsideScott in forum Excel Formulas & Functions
    Replies: 1
    Last Post: 03-14-2007, 09:11 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