Hi,
The below code enables me to 'click' for multiple selections as the screenshot highlights.
However, as can be seen in cell K5:
- when selecting '4%' and 'a38%" together - '4%' suddenly become '0.04' and this is causing issues for my lookups.
Does anyone know what is causing this issue and perhaps have a solution to fix it?
Furthermore, if there is a way to achieve 1&2 I would be very much grateful:
1) restrict this code to selecting 2 options only
2) when hitting the DEL button the cell defaults to '[%]'
The below code enables me to 'click' for multiple selections as the screenshot highlights.
However, as can be seen in cell K5:
- when selecting '4%' and 'a38%" together - '4%' suddenly become '0.04' and this is causing issues for my lookups.
Does anyone know what is causing this issue and perhaps have a solution to fix it?
Furthermore, if there is a way to achieve 1&2 I would be very much grateful:
1) restrict this code to selecting 2 options only
2) when hitting the DEL button the cell defaults to '[%]'
Dim Oldvalue As String
Dim Newvalue As String
On Error GoTo Exitsub
If Target.Row = 5 Then
If Target.SpecialCells(xlCellTypeAllValidation) Is Nothing Then
GoTo Exitsub
Else: If Target.Value = "" Then GoTo Exitsub Else
Application.EnableEvents = False
Newvalue = Target.Value
Application.Undo
Oldvalue = Target.Value
If Oldvalue = "" Then
Target.Value = Newvalue
Else
Target.Value = Oldvalue & ", " & Newvalue
End If
End If
End If
Application.EnableEvents = True
Exitsub:
Application.EnableEvents = True
End Sub