-
=today(),now()
dear experts,
i have column "Locked" ,when user update his data in other column direct give me date/time he updated by this function:
=IF(ISTEXT(B2),TODAY(),"")
OR
=IF(ISTEXT(B2),NOW(),"")
the problem for me :any time openning the file: update me time and date "NOW"
What is the function to to keep the date/time of the user he updated "Not the date/time NOW!!!!!"
thanks in advance,
-
Put this in the worksheet module. This will update a corresponding cell if a value in Column B is changed
[VBA]Private Sub Worksheet_Change(ByVal Target As Range)
If Target.Column <> 2 Or Target.Cells.Count > 1 Then Exit Sub
Target.Offset(, 2) = Now
End Sub
[/VBA]
MVP (Excel 2008-2010)
Post a workbook with sample data and layout if you want a quicker solution.
To help indent your macros try Smart Indent
Please remember to mark threads 'Solved'
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules