Results 1 to 6 of 6

Insert static date automatically on pasting large amount of date

Threaded View

Toro- Insert static date... 04-20-2016, 05:47 PM
xladept Re: Insert static date... 04-20-2016, 07:51 PM
Toro- Re: Insert static date... 04-21-2016, 03:05 AM
Toro- Re: Insert static date... 04-21-2016, 08:11 AM
AlphaFrog Re: Insert static date... 04-20-2016, 09:22 PM
Mandeep Baluja Re: Insert static date... 04-21-2016, 04:06 AM
  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.

    Private Sub Worksheet_Change(ByVal Target As Range)
        With Target
            If .Cells.Count > 1 Then Exit Sub
            If Intersect(.Cells, Me.Range("A:A")) Is Nothing Then Exit Sub
            .Offset(0,1).Value = Date         '''''' or  Now
        End With
    End Sub
    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....

    Private Sub Worksheet_Change(ByVal Target As Range)
     MsgBox IIf(Application.CutCopyMode = xlCopy, "Pasted", "Normal Entry")
     End Sub
    ...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

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 playtowinpb@msn.com 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