How to Create A MULTI-SELECT Drop-Down List in Excel!

Опубликовано: 16 Март 2024
на канале: Anser's Excel Academy
31,305
114

In this video, I'll walk you through the step-by-step process of setting up a multi-select drop-down list, a technique that can significantly streamline your workflow and reduce the margin for error. Whether you're compiling reports, managing inventories, or tracking projects, this tutorial is designed to make your Excel experience smoother and more efficient. Don't forget to subscribe to Anser's Excel Academy for more tips and tricks that will turn you into an Excel wizard. Together, let's unlock the full potential of Excel and make data management a breeze.

VBA Code credit goes to ‪@SoftTechTutorials89‬

Private Sub Worksheet_Change(ByVal Target As Range)

' Initializing variables
Dim oldVal As String
Dim newVal As String

' Checking for changes in the drop down lists

Application.EnableEvents = True

If Target.Address = "$G$2" Or Target.Address = "$G$3" Then

If Target.SpecialCells(xlCellTypeAllValidation) Is Nothing Then
Exit Sub
' Adding the multiple selected items to the list
Else
If Target.Value = "" Then
Exit Sub

Else
Application.EnableEvents = False
newVal = Target.Value
Application.Undo
oldVal = Target.Value
If oldVal = "" Then
Target.Value = newVal
Else
If InStr(oldVal, newVal) = 0 Then
Target.Value = oldVal & ", " & newVal '& vbNewLine &
Else
Target.Value = oldVal
End If
End If
End If
End If
End If

Application.EnableEvents = True

End Sub


Смотрите видео How to Create A MULTI-SELECT Drop-Down List in Excel! онлайн без регистрации, длительностью часов минут секунд в хорошем качестве. Это видео добавил пользователь Anser's Excel Academy 16 Март 2024, не забудьте поделиться им ссылкой с друзьями и знакомыми, на нашем сайте его посмотрели 31,305 раз и оно понравилось 114 людям.