Results 1 to 2 of 2

Macro to Auto Update Cell to Current Date

Threaded View

matttleong Macro to Auto Update Cell to... 10-01-2012, 09:03 PM
vlady Re: Macro to Auto Update Cell... 10-01-2012, 09:13 PM
  1. #1
    Registered User
    Join Date
    09-30-2012
    Location
    New York, NY
    MS-Off Ver
    Excel 2010
    Posts
    1

    Macro to Auto Update Cell to Current Date

    The goal is a macro that will update the date anytime a cell in that row is changed. The following macro will input a current date into column 2 of the current row anytime a cell (other than in column 2) was “changed”. The problem I have is that this subroutine is activated anytime the cell is double clicked, even if nothing was changed. This is a built in subroutine already provided by excel that is triggered on the double click. I need a way to avoid changing the date column if nothing was changed. Any help is appreciated. Thanks


    Private Sub Worksheet_Change(ByVal Target As Range)
    If Target.Column <> 2 Then
        Cells(Target.Row, 2) = Date
    End If
    End Sub
    Last edited by matttleong; 10-01-2012 at 10:04 PM. Reason: Forgot Code tag

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

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