Worksheet event is used.
Let the validation range is C2:C6.
Select the range C2:C6. select Data Validation in ribbon.
In the Data Validation dialogue box select Error Alert. In Style dropdown select Information. Ok.
Event code:
Code:
Private Sub Worksheet_Change(ByVal Target As Range)
If Not Intersect(Target, Range("C2:C6")) Is Nothing Then
Application.EnableEvents = False
Target = Left(Target, 2)
Application.EnableEvents = True
End If
End Sub
How to use worksheet event the code
Right click on Sheet tab --> view code
Visual Basic (VB) window opens.
Paste the code
Close the VB window.
Save the file as .xlsm