메인 컨텐츠로 가기

드롭 다운 목록에서 여러 항목을 Excel의 셀로 선택하는 방법은 무엇입니까?

드롭 다운 목록은 Excel 일상 작업에서 자주 사용됩니다. 기본적으로 드롭 다운 목록에서 하나의 항목 만 선택할 수 있습니다. 그러나 경우에 따라 아래 스크린 샷과 같이 드롭 다운 목록에서 단일 셀로 여러 항목을 선택해야 할 수 있습니다. Excel에서 어떻게 처리 할 수 ​​있습니까?

문서 드롭 다운 목록에서 여러 항목을 선택 1 문서 화살표 오른쪽 문서 드롭 다운 목록에서 여러 항목을 선택 2

드롭 다운 목록에서 VBA를 사용하여 셀로 여러 항목 선택

드롭다운 목록에서 셀로 쉽고 빠르게 여러 항목 선택


드롭 다운 목록에서 VBA를 사용하여 셀로 여러 항목 선택

다음은이 작업을 해결하는 데 도움이 될 VBA가 있습니다.

셀의 드롭 다운 목록에서 중복 항목 선택

1. 드롭 다운 목록을 생성 한 후 시트 탭에서 마우스 오른쪽 버튼을 클릭하여 코드보기 컨텍스트 메뉴에서.
문서 드롭 다운 목록에서 여러 항목을 선택 3

2. 그런 다음 응용 프로그램 용 Microsoft Visual Basic 창에서 코드 아래에 복사하여 빈 스크립트에 붙여 넣습니다.

VBA : 셀의 드롭 다운 목록에서 여러 항목 선택

Private Sub Worksheet_Change(ByVal Target As Range)
'UpdatebyExtendoffice20221111
    Dim xRgVal As Range
    Dim xStrNew As String
    On Error Resume Next
    Set xRgVal = Cells.SpecialCells(xlCellTypeAllValidation)
    If (Target.Count > 1) Or (xRgVal Is Nothing) Then Exit Sub
    If Intersect(Target, xRgVal) Is Nothing Then Exit Sub
    If Target.Value = "" Then Exit Sub
    Application.EnableEvents = False
    xStrNew = Target.Value
    Application.Undo
    If xStrNew = Target.Value Then
    Else
    xStrNew = xStrNew & " " & Target.Value
    Target.Value = xStrNew
    End If
    Application.EnableEvents = True
End Sub

3. 코드를 저장하고 창을 닫아 드롭 다운 목록으로 돌아갑니다. 이제 드롭 다운 목록에서 여러 항목을 선택할 수 있습니다.

참고 :

1. VBA를 사용하면 항목을 공백으로 구분하여 변경할 수 있습니다. xStrNew = xStrNew & "" & 목표치 필요에 따라 구분 기호를 변경할 수 있습니다. 예를 들면 xStrNew = xStrNew & "," & 목표치 항목을 쉼표로 구분합니다.

2.이 VBA 코드는 시트의 모든 드롭 다운 목록에서 작동합니다.

드롭 다운 목록에서 반복없이 셀로 여러 항목 선택

드롭 다운 목록에서 셀까지 고유 한 항목을 선택하려는 경우 위의 단계를 반복하고 아래 코드를 사용할 수 있습니다.

VBA : 드롭 다운 목록에서 반복없이 셀로 여러 항목 선택

Private Sub Worksheet_Change(ByVal Target As Range)
'UpdatebyExtendoffice20221111
    Dim I As Integer
    Dim xRgVal As Range
    Dim xStrNew As String
    Dim xStrOld As String
    Dim xFlag As Boolean
    Dim xArr
    On Error Resume Next
    Set xRgVal = Cells.SpecialCells(xlCellTypeAllValidation)
    If (Target.Count > 1) Or (xRgVal Is Nothing) Then Exit Sub
    If Intersect(Target, xRgVal) Is Nothing Then Exit Sub
    If Target.Value = "" Then Exit Sub
    Application.EnableEvents = False
    xFlag = True
    xStrNew = " " & Target.Value & " "
    Application.Undo
    xStrOld = Target.Value
    If InStr(1, xStrOld, xStrNew) = 0 Then
        xStrNew = xStrNew & xStrOld & " "
    Else
        xStrNew = xStrOld
    End If
    Target.Value = xStrNew
    Application.EnableEvents = True
End Sub

위의 두 VBA 코드는 셀 내용의 일부를 삭제하는 것을 지원하지 않으며 셀의 모든 항목을 지우는 것만 지원합니다.


드롭다운 목록에서 셀로 쉽고 빠르게 여러 항목 선택

Excel에서는 VBA 코드를 제외하고 셀의 드롭다운 목록에서 여러 항목을 선택할 수 있는 다른 방법이 없습니다. 그러나, 그 다중 선택 드롭 다운 목록 특징 Excel 용 Kutools 클릭만으로 이 작업을 빠르고 쉽게 처리할 수 있습니다.

: 이 도구를 적용하기 전에 먼저 Excel용 Kutools를 설치하세요. 지금 무료 다운로드로 이동.
1 단계: Kutools 선택 > 드롭 다운 목록 > 다중 선택 드롭 다운 목록
2단계: 다중 선택 드롭다운 목록 대화 상자에서 설정을 지정합니다.
  1. 범위 설정
  2. 셀의 구분 항목에 대한 구분 기호를 지정합니다.
  3. 텍스트 방향을 결정합니다.
  4. 확인을 클릭합니다.
    doc 드롭다운 목록 kte 1에서 여러 항목 선택
결과 :

드롭 다운 목록 kutools에서 여러 항목 선택

주의 사항: 다중 선택 드롭다운 목록 기능을 사용하려면 먼저 Excel용 Kutools를 설치해야 합니다. 다운로드하려면 클릭하고 지금 30일 무료 평가판을 사용하세요..

Excel에서 동적 2 단계 또는 다중 수준 종속 드롭 다운 목록을 쉽게 생성

Excel에서 2 단계 또는 다중 수준 드롭 다운 목록을 만드는 것은 복잡합니다. 여기 동적 드롭 다운 목록 ~의 유용성 Excel 용 Kutools 당신에게 호의를 베풀 수 있습니다. 당신이해야 할 일은 예제와 같이 데이터를 주문한 다음 데이터 범위와 출력 범위를 선택한 다음 유틸리티에 맡기는 것입니다.  30 일 무료 평가판을 클릭하십시오!
문서 고급 결합 행
 
Excel 용 Kutools : 300 개 이상의 편리한 Excel 추가 기능으로 30 일 동안 제한없이 무료로 사용해 볼 수 있습니다.

최고의 사무 생산성 도구

🤖 Kutools AI 보좌관: 다음을 기반으로 데이터 분석을 혁신합니다. 지능형 실행   |  코드 생성  |  사용자 정의 수식 만들기  |  데이터 분석 및 차트 생성  |  Kutools 기능 호출...
인기 기능: 중복 항목 찾기, 강조 표시 또는 식별   |  빈 행 삭제   |  데이터 손실 없이 열이나 셀 결합   |   수식없이 반올림 ...
슈퍼 조회: 다중 기준 VLookup    다중 값 VLookup  |   여러 시트에 걸친 VLookup   |   퍼지 조회 ....
고급 드롭다운 목록: 드롭다운 목록을 빠르게 생성   |  종속 드롭다운 목록   |  다중 선택 드롭 다운 목록 ....
열 관리자: 특정 개수의 열 추가  |  열 이동  |  Toggle 숨겨진 열의 가시성 상태  |  범위 및 열 비교 ...
특색 지어진 특징: 그리드 포커스   |  디자인보기   |   큰 수식 바    통합 문서 및 시트 관리자   |  리소스 라이브러리 (자동 텍스트)   |  날짜 선택기   |  워크 시트 결합   |  셀 암호화/해독    목록으로 이메일 보내기   |  슈퍼 필터   |   특수 필터 (굵게/기울임꼴/취소선 필터링...) ...
상위 15개 도구 세트12 본문 도구 (텍스트 추가, 문자 제거,...)   |   50+ 거래차트 유형 (Gantt 차트,...)   |   40+ 실용 방식 (생일을 기준으로 나이 계산,...)   |   19 삽입 도구 (QR 코드 삽입, 경로에서 그림 삽입,...)   |   12 매출 상승 도구 (숫자를 단어로, 환율,...)   |   7 병합 및 분할 도구 (고급 결합 행, 셀 분할,...)   |   ... 그리고 더

Excel용 Kutools로 Excel 기술을 강화하고 이전과는 전혀 다른 효율성을 경험해 보세요. Excel용 Kutools는 생산성을 높이고 시간을 절약하기 위해 300개 이상의 고급 기능을 제공합니다.  가장 필요한 기능을 얻으려면 여기를 클릭하십시오...

상품 설명


Office Tab은 Office에 탭 인터페이스를 제공하여 작업을 훨씬 쉽게 만듭니다.

  • Word, Excel, PowerPoint에서 탭 편집 및 읽기 사용, Publisher, Access, Visio 및 Project.
  • 새 창이 아닌 동일한 창의 새 탭에서 여러 문서를 열고 만듭니다.
  • 생산성을 50% 높이고 매일 수백 번의 마우스 클릭을 줄입니다!
Comments (26)
No ratings yet. Be the first to rate!
This comment was minimized by the moderator on the site
Como posso utilizar a função com a planilha bloqueada?
This comment was minimized by the moderator on the site
Hi, Macros, try below code, it supports to select multi items in drop down list in protected sheet.
Private Sub Worksheet_Change(ByVal Target As Range)
'UpdatebyExtendoffice20221111
    Dim xRgVal As Range
    Dim xStrNew As String
    On Error Resume Next  
    xType = 0
    xType = Target.Validation.Type
    If xType <> 3 Then Exit Sub
    If (Target.Count > 1) Then Exit Sub

    If Target.Value = "" Then Exit Sub
    Application.EnableEvents = False
    xStrNew = Target.Value
    Application.Undo
    If xStrNew = Target.Value Then
    Else
    xStrNew = xStrNew & " " & Target.Value
    Target.Value = xStrNew
    End If
    Application.EnableEvents = True
End Sub

And also Kutools for Excel 26.1 and later versions supports this job in protected sheet.
This comment was minimized by the moderator on the site
¿Cómo puedo hacer para que el orden en que se coloque el texto, sea tan cuál como yo quiera?

Ejemplo:
Mi texto para la lista es:
TRAMITAR ESTE ASUNTO
COORDINAR
ANALIZAR Y RECOMENDAR

sí selecciono:
TRAMITAR ESTE ASUNTO
ANALIZAR Y RECOMENDAR

me aparece
ANALIZAR Y RECOMENDAR, TRAMITAR ESTE ASUNTO

o sea, los de abajo me aparecen primero, pero quiero que sea en el orden en que voy seleccionando...
TRAMITAR ESTE ASUNTO, ANALIZAR Y RECOMENDAR.....
This comment was minimized by the moderator on the site
Hi, Gorgelys, Kutools's multi-select drop down list can help you. The items you selected will be in the order like you want.
This comment was minimized by the moderator on the site
the code works but won't let me delete can someone please post the new code.
This comment was minimized by the moderator on the site
bonjour,
selon le premier exemple tout fonctionne très bien jusqu'à ce que je verrouille la feuille.
quand la feuille est verrouillée, je n'ai plus le choix multiple !
comment faire ?
merci par avance
This comment was minimized by the moderator on the site
Hi, sorry for that. We will upgrade our feature next version to avoid this problem. Thank you for your feekback.
This comment was minimized by the moderator on the site
Merci bcp
Mais à quand la nouvelle version ?
This comment was minimized by the moderator on the site
Hi, we have updated this version for you, but this is a beta version, please download it from this: https://download.extendoffice.com/downloads/Kutools-for-Excel/beta/26.10/KutoolsforExcelSetup.Inno.exe
If there are any problems, welcome for your feedback.
This comment was minimized by the moderator on the site
Merci,
Je vais la télécharger et essayer.
Bonne journée
This comment was minimized by the moderator on the site
Hi, the new version is in planning, since next version will upgrade multiple features, it may take somewhat time.
This comment was minimized by the moderator on the site
Hi! Como puedo usar este codigo para todo un worksheet y no solo para una pestana?
This comment was minimized by the moderator on the site
Hi, Vero, Kutools for Excel's Multi-select Drop-down List feature suports selecting multiple items from drop down list in the whole worksheet or across workbook, just specify the Specified Scope in the Multi-select Drop-down List Settings dialog.
This comment was minimized by the moderator on the site
How can I do that for the fist formula you provided :) Thanks in advanced!
This comment was minimized by the moderator on the site
Quando quero deletar alguma opção ou todas dá erro. Como posso resolver?
This comment was minimized by the moderator on the site
I am also finding that after selecting multiple items using the updated VBA code, I still cannot clear the cell, it just keeps multiplying.
Does anyone have a solution for this yet?
This comment was minimized by the moderator on the site
Hi, Rusty, the code I have updated for making it more stable. But because the cell is in data validation, blank is out of data validation, the code cannot solve this problem.
This comment was minimized by the moderator on the site
the code works but carries over across all cells and multiplies in the cells and wont allow delete can you assist?
This comment was minimized by the moderator on the site
If I create a sheet with dropdown list using checkboxes, is there a way to share this workbook with this checkboxes feature?
This comment was minimized by the moderator on the site
How would you apply this functionality but making it so that there aren't redundant values? Any help would be appreciated!
This comment was minimized by the moderator on the site
I used this "Select multiple items from drop down list to a cell without repeat"
this is what happened
1. Multiple selections happen without problems.
2. The issue is when i try to edit and remove an option. There is no way for me to remove an option. it keeps multiplying.
There are no comments posted here yet
Load More
Please leave your comments in English
Posting as Guest
×
Rate this post:
0   Characters
Suggested Locations