Selection of item on dropdown list returns timestamp

Brondum

New member
Joined
Nov 2, 2021
Messages
3
Reaction score
0
Points
0
Excel Version(s)
Excel 2016
Hi all gurus

I am trying to make a way of tracking our process. I have created a dropdown list and when I move to another step in the process it should provide me a timestamp, so that I can see how long time we spend on each step.

I have tried to do something like this:

This should say okay you selected "" in the dropdown list, I will then create a timestamp in the column with the heading identical to selection on dropdown list. Then lastly, lock the cells so that dates cannot be changed again.

Private Sub Worksheet_Change(ByVal Target As Range)
Dim fn As Integer
If Not Intersect(Target, Range("C2:C2500")) Is Nothing Then
fn = [D1:J1].Find(Target.Value).Column
If Cells(Target.Row, fn) = "" Then
Cells(Target.Row, fn).Value = Now
Cells(Target.Row, fn).NumberFormat = "mm/dd/yy"
Cells(Target.Row, fn).Locked = True
End If
End If
End Sub
 

Attachments

  • AzureBoard v1.xlsm
    17.2 KB · Views: 10
Seems good to me, does it have an issue ?
 
Seems good to me, does it have an issue ?

No timestamp Spears in the expected cells evne though the code runs. I Can see it sats circular calculation
 
Sorry, what does "Spears" stand for ? All the items in the dropdown list, when selected, timestamp in the corrispondent column. What am I missing ?
 
Sorry, what does "Spears" stand for ? All the items in the dropdown list, when selected, timestamp in the corrispondent column. What am I missing ?

Sorry autocorrect. Should be appear.

I have now tried on my own computer and it works perfectly. Maybe it has something to do with us using office 365 at my workplace. At home i use standalone office 2016.

Thank you for your time.
 
Glad having been of some help.
At workplace, are macros enabled ? perhaps not for security reasons.
 
Last edited:
Back
Top