Conditional Date and Time Change

mbshafe

Board Regular
Joined
Apr 14, 2011
Messages
54
I'd like to have the date and time in a cell update automatically when the value of another cell changes, however, I then want the date and time to remain until the other cell is changed again...can anyone give me a suggestion? TIA...Mike
 

Excel Facts

Does the VLOOKUP table have to be sorted?
No! when you are using an exact match, the VLOOKUP table can be in any order. Best-selling items at the top is actually the best.
You'll need a Worksheet_Change event macro written.

What cell/range of cells would have the date and time in it? What cell/range of cells would you be modifying?
 
Upvote 0
The sheet is called Position Detail, the cell with the date and time is Q3, the cell that will be changing is P3...thanks
 
Upvote 0
You will need to post this code in the Position Detail worksheet object in the Visual Basic Editor.

Code:
Private Sub Worksheet_Change(ByVal Target As Range)
    If Not Intersect(Target, Range("P3")) Is Nothing Then
        Range("Q3").Value = Now
    End If
End Sub
 
Upvote 0
I have encountered another problem...the date and time updates when I open the file and I want it to show the last time the value of the cell was changed. It is a manually inputted value, so it shouldn't be changing during any recalculation.
 
Upvote 0

Forum statistics

Threads
1,224,584
Messages
6,179,691
Members
452,938
Latest member
babeneker

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top