Буду признателен за помощь в решении проблемы. Следующий пример кода позволяет мне выбрать несколько значений из выпадающего списка, однако мне нужно, чтобы target.address был в каждой строке в столбце S.
Я не уверен, как изменить целевой адрес так, чтобы он находился в диапазоне от s10 (т. Е. S10-S150)
Private Sub Worksheet_Change(ByVal Target As Range)
Dim Oldvalue As String
Dim Newvalue As String
On Error GoTo Exitsub
If Target.Address = "$S10" 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
Спасибо!