Consulting

Results 1 to 2 of 2

Thread: Excel table if update the row end of cell date cell should update accordingly

  1. #1

    Post Excel table if update the row end of cell date cell should update accordingly

    Hi all,

    I have table in that rows and columns, if update the particular row end of the row I have date/time cell on updation of row accordingly dated cell has to modify with the today's date i.e. modified date.

    Is it possible to create the cell, kindly help me.

    thanks in advance.

  2. #2
    VBAX Expert
    Joined
    Oct 2012
    Posts
    726
    Location
    Hi

    Put this in the sheet's module and change the DATECOLUMN value (e.g. 5 = column E).

    Private Const DATECOLUMN = 5 '<-- CHANGE THIS VALUE TO MATCH YOUR SHEET
    
    Private dupd As Boolean
    
    Private Sub Worksheet_Change(ByVal Target As Range)
        Dim c As Range
        If Not dupd Then
            dupd = -1
            For Each c In Target.Cells
                If c.Column <= DATECOLUMN Then _
                    Cells(c.Row, DATECOLUMN) = Now
            Next
            dupd = 0
        End If
    End Sub

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •