How do we create a VBA code such that we can toggle between 4 values for any given cell within one column, and that it would not click into any "Edit" mode after clicking the cell?
The 4 values are : Y, N, L and G.
The only code I could gather (shown below) is problematic as it enters into an edit mode when clicking, and it doesnt allow me to perform toggle cell function for an entire column using the same VBA code:
Private Sub Worksheet_SelectionChange(ByVal Target As Excel.Range)
If Target.Row <> 1 Then Exit Sub
Select Case UCase(Target.Value)
Case Is = "Y"
Target.Value = "N"
Case Is = "N"
Target.Value = "L"
Case Is = "L"
Target.Value = "G"
Case Is = "G"
Target.Value = "Y"
End Select
End Sub
----- Thanks for the replies! Please see attached image. The idea is to be able to toggle the status of any items featured. The Status column is at Column L, and i need it to to toggled between Y-N-L-G, instead of using any dropdown list.
Case "Y": Target.CurrentRegion.Columns(Target.Column).Replace "Y", "N"