PDA

View Full Version : Excel table if update the row end of cell date cell should update accordingly



rohanjayanth
03-03-2015, 10:53 PM
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.

jonh
03-04-2015, 03:12 AM
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