Forum Discussion
leenash9702
Nov 01, 2022Copper Contributor
If condition met, set value in cell, otherwise let user insert the value
Hi. I have a task checklist which has 2 columns, E5:E60 is the percentage of completion, and F5:F60 is the status (Done, In progress...etc.). When the user selects Done from drop down menu in an...
OliverScheurich
Nov 01, 2022Gold Contributor
Private Sub Worksheet_Change(ByVal Target As Range)
Dim rngBereich As Range
Application.EnableEvents = False
Set rngBereich = Range("F5:F60")
If Not Application.Intersect(Target, rngBereich) Is Nothing Then
If Target.Value = "Done" Then
Target.Offset(0, -1).Value = 1
Target.Offset(0, -1).NumberFormat = "0%"
Else
End If
End If
done:
Application.EnableEvents = True
Exit Sub
End SubYou can try these lines of code for a case sensitive match.