SOLVED

looking to make first column a time stamp of entry in second column

%3CLINGO-SUB%20id%3D%22lingo-sub-2263197%22%20slang%3D%22en-US%22%3Elooking%20to%20make%20first%20column%20a%20time%20stamp%20of%20entry%20in%20second%20column%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-2263197%22%20slang%3D%22en-US%22%3E%3CP%3Eattached%20the%20spreadsheet%20that%20I%20am%20trying%20to%20do%20this%20with.%26nbsp%3B%20would%20like%20it%20to%20be%20static%20so%20that%20it%20does%20not%20change%20when%20recalculating.%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-LABS%20id%3D%22lingo-labs-2263197%22%20slang%3D%22en-US%22%3E%3CLINGO-LABEL%3EFormulas%20and%20Functions%3C%2FLINGO-LABEL%3E%3C%2FLINGO-LABS%3E
New Contributor

attached the spreadsheet that I am trying to do this with.  would like it to be static so that it does not change when recalculating.

 

2 Replies

@rodhorning 

I don't see an attachment, but try the following:

Right-click the sheet tab.

Select View Code from the context menu.

Copy the following code into the worksheet module:

Private Sub Worksheet_Change(ByVal Target As Range)
    If Not Intersect(Range("B2:B" & Rows.Count), Target) Is Nothing Then
        Application.ScreenUpdating = False
        Application.EnableEvents = False
        Intersect(Range("B2:B" & Rows.Count), Target).Offset(0, -1).Value = Now
        Application.EnableEvents = True
        Application.ScreenUpdating = True
    End If
End Sub

Switch back to Excel.

Save the workbook as a macro-enabled workbook (*.xlsm).

best response confirmed by rodhorning (New Contributor)
Solution

@Hans Vogelaar 

 

Works just like I wanted,  Never knew about doing it on the sheet tab.  I have a lot to learn.  Thank You.