메인 컨텐츠로 가기

Excel 드롭 다운 목록에 입력 할 때 자동 완성하는 방법은 무엇입니까?

항목이 많은 데이터 유효성 검사 드롭다운 목록의 경우 목록에서 위아래로 스크롤하여 필요한 항목을 찾거나 목록 상자에 전체 단어를 올바르게 입력해야 합니다. 해당 문자를 입력할 때 드롭다운 목록을 자동 완성하는 방법이 있습니까? 이렇게 하면 사람들이 셀에 드롭다운 목록이 있는 워크시트에서 보다 효율적으로 작업할 수 있습니다. 이 자습서에서는 이를 달성하는 데 도움이 되는 두 가지 방법을 제공합니다.

VBA 코드로 드롭다운 목록 자동 완성 만들기
드롭다운 목록을 2초 만에 쉽게 자동 완성

드롭 다운 목록에 대한 추가 자습서 ...


VBA 코드로 드롭다운 목록 자동 완성 만들기

셀에 해당 문자를 입력 한 후 드롭 다운 목록이 자동 완성되도록하려면 다음과 같이하십시오.

먼저 워크 시트에 콤보 상자를 삽입하고 속성을 변경해야합니다.
  1. 자동 완성되도록 하려는 드롭다운 목록 셀이 ​​포함된 워크시트를 엽니다.
  2. 콤보 상자를 삽입하기 전에 Excel 리본에 개발 도구 탭을 추가해야 합니다. 리본에 개발자 탭이 표시되는 경우 3 단계로 이동. 그렇지 않으면 리본에 개발자 탭이 표시되도록 다음과 같이 하십시오. 입양 부모로서의 귀하의 적합성을 결정하기 위해 미국 이민국에 > 옵션 를 열려면 옵션 창문. 이것에 Excel 옵션 창을 클릭합니다 리본 맞춤 설정 왼쪽 창에서 개발자 상자를 클릭 한 다음 OK 단추. 스크린 샷보기 :
  3. 개발자 > 끼워 넣다 > 콤보 상자 (ActiveX 컨트롤).
  4. 현재 워크시트에 콤보 상자를 그립니다. 마우스 오른쪽 버튼을 클릭한 후 선택하세요. 등록 오른쪽 클릭 메뉴에서.
  5. . 등록 대화 상자의 원본 텍스트를 바꾸십시오. (이름) 필드 템프콤보.
  6. 전원 끄기 디자인 모드 클릭하여 개발자 > 디자인 모드.
그런 다음 아래 VBA 코드를 적용하십시오
  1. 현재 시트 탭을 마우스 오른쪽 버튼으로 클릭하고 코드보기 상황에 맞는 메뉴에서. 스크린 샷보기 :
  2. 오프닝에서 응용 프로그램 용 Microsoft Visual Basic 아래의 VBA 코드를 복사하여 워크 시트의 코드 창에 붙여 넣으십시오.
    VBA 코드 : 드롭 다운 목록 입력시 자동 완성
    Private Sub Worksheet_SelectionChange(ByVal Target As Range)
    'Update by Extendoffice: 2020/01/16
        Dim xCombox As OLEObject
        Dim xStr As String
        Dim xWs As Worksheet
        Dim xArr
        
        Set xWs = Application.ActiveSheet
        On Error Resume Next
        Set xCombox = xWs.OLEObjects("TempCombo")
        With xCombox
            .ListFillRange = ""
            .LinkedCell = ""
            .Visible = False
        End With
        If Target.Validation.Type = 3 Then
            Target.Validation.InCellDropdown = False
            Cancel = True
            xStr = Target.Validation.Formula1
            xStr = Right(xStr, Len(xStr) - 1)
            If xStr = "" Then Exit Sub
            With xCombox
                .Visible = True
                .Left = Target.Left
                .Top = Target.Top
                .Width = Target.Width + 5
                .Height = Target.Height + 5
                .ListFillRange = xStr
                If .ListFillRange = "" Then
                    xArr = Split(xStr, ",")
                    Me.TempCombo.List = xArr
                End If
                .LinkedCell = Target.Address
            End With
            xCombox.Activate
            Me.TempCombo.DropDown
        End If
    End Sub
    Private Sub TempCombo_KeyDown(ByVal KeyCode As MSForms.ReturnInteger, ByVal Shift As Integer)
        Select Case KeyCode
            Case 9
                Application.ActiveCell.Offset(0, 1).Activate
            Case 13
                Application.ActiveCell.Offset(1, 0).Activate
        End Select
    End Sub
  3. PR 기사 다른 + Q 키를 동시에 닫아 Microsoft Visual Basic 애플리케이션 창.

이제부터 드롭 다운 목록 셀을 클릭하면 드롭 다운 목록이 자동으로 프롬프트됩니다. 선택한 셀에서 해당 항목이 자동으로 완성되도록 문자를 입력하기 시작할 수 있습니다. 스크린 샷보기 :

참고 : 이 코드는 병합 된 셀에는 작동하지 않습니다.

드롭다운 목록을 2초 만에 쉽게 자동 완성

대부분의 Excel 사용자에게 위의 VBA 방법은 마스터하기 어렵습니다. 그러나 검색 가능한 드롭 다운 목록 특징 Excel 용 Kutools에서 데이터 유효성 검사 드롭다운 목록에 대한 자동 완성을 쉽게 활성화할 수 있습니다. 지정된 범위 단 2초 만에. 또한 이 기능은 모든 Excel 버전에서 사용할 수 있습니다.

: 이 도구를 적용하기 전에 다음을 설치하십시오. Excel 용 Kutools 첫째로. 지금 무료 다운로드로 이동.

  1. 드롭다운 목록에서 자동 완성을 활성화하려면 먼저 드롭다운을 사용하여 범위를 선택하세요. 그런 다음 쿠툴 탭에서 드롭 다운 목록 > 드롭다운 목록을 검색 가능하게 만들고 자동 팝업되도록 설정.
  2. . 드롭다운 목록을 검색 가능하게 만들기 대화 상자에서 OK 버튼을 눌러 설정을 저장하십시오.
결과

구성이 완료되면 지정된 범위 내의 드롭다운 목록 셀을 클릭하면 목록 상자가 나타납니다. 문자를 입력할 때 한 항목이 정확히 일치하는 한 전체 단어가 목록 상자에서 즉시 강조 표시되고 Enter 키를 누르기만 하면 드롭다운 목록 셀에 채워질 수 있습니다.

주의 사항: 이 기능을 적용하려면 Excel 용 Kutools 다운로드 및 설치 첫 번째. 아니면 할 수 있습니다 이 기능에 대해 자세히 알아보려면 클릭하세요..

관련 기사 :

Excel에서 여러 확인란이있는 드롭 다운 목록을 만드는 방법은 무엇입니까?
많은 Excel 사용자는 시간당 목록에서 여러 항목을 선택하기 위해 여러 확인란이있는 드롭 다운 목록을 만드는 경향이 있습니다. 실제로 데이터 유효성 검사로 여러 확인란이있는 목록을 만들 수 없습니다. 이 자습서에서는 Excel에서 여러 확인란이있는 드롭 다운 목록을 만드는 두 가지 방법을 보여줍니다. 이 튜토리얼은 문제를 해결하는 방법을 제공합니다.

Excel의 다른 통합 문서에서 드롭 다운 목록 만들기
통합 문서 내의 워크 시트간에 데이터 유효성 검사 드롭 다운 목록을 만드는 것은 매우 쉽습니다. 그러나 데이터 유효성 검사에 필요한 목록 데이터가 다른 통합 문서에있는 경우 어떻게 하시겠습니까? 이 자습서에서는 Excel의 다른 통합 문서에서 드롭 fown 목록을 만드는 방법에 대해 자세히 알아 봅니다.

Excel에서 검색 가능한 드롭 다운 목록 만들기
값이 많은 드롭 다운 목록의 경우 적절한 값을 찾는 것은 쉬운 일이 아닙니다. 이전에는 드롭 다운 상자에 첫 글자를 입력 할 때 드롭 다운 목록을 자동 완성하는 방법을 도입했습니다. 자동 완성 기능 외에도 드롭 다운 목록에서 적절한 값을 찾을 때 작업 효율성을 높이기 위해 드롭 다운 목록을 검색 가능하게 만들 수도 있습니다. 드롭 다운 목록을 검색 가능하게 만들려면이 자습서의 방법을 시도하십시오.

Excel 드롭 다운 목록에서 값을 선택할 때 다른 셀 자동 채우기
셀 범위 B8 : B14의 값을 기반으로 드롭 다운 목록을 만들었다 고 가정 해 보겠습니다. 드롭 다운 목록에서 값을 선택할 때 셀 범위 C8 : C14의 해당 값이 선택한 셀에 자동으로 채워지기를 원합니다. 문제를 해결하기 위해이 튜토리얼의 방법이 도움이 될 것입니다.

드롭 다운 목록에 대한 추가 자습서 ...

최고의 사무 생산성 도구

🤖 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 (325)
No ratings yet. Be the first to rate!
This comment was minimized by the moderator on the site
Hi, many thanks for this material. It helped a lot.
This comment was minimized by the moderator on the site
Hello,

following on from my last comment:

I'm setting up 'standard' rows with the dropdown lists in them. These I'm wanting to copy below into an extensive spreadsheet.
Unfortunately the dropdown's don't copy down when I do that after using the VBA.
Is there a way to do whats described above?

Cheers,
Catherine
This comment was minimized by the moderator on the site
Hi Catherine,
The autocomplete drop-down lists generated by VBA code cannot be copied. You can only copy selected items that are displayed in the drop-down cell. Sorry for the inconvenience.
This comment was minimized by the moderator on the site
Hello,

Have implemented this successfully, so thank you for this page and code.
But now I have an associated problem...:

After doing all of the above points, the code works as described, but I cannot do any undo/redo actions in the entire spreadsheet.
Is there a way to turn this combo box on for when I want to work with the dropdowns and off for when I want to work in other cells? so that the undo/redo actions are possible again?
and note, yes I have turned the design mode off after doing the above steps, but it still doesn't help the problem.

Cheers,
Catherine
This comment was minimized by the moderator on the site
Hi Catherine Foley,
If you want to use the undo operation on cells other than the drop-down cells, the following VBA code can help you. Please give it a try.
Private Sub Worksheet_SelectionChange(ByVal Target As Range)
'Update by Extendoffice: 2022/09/22
    Dim xCombox As OLEObject
    Dim xStr As String
    Dim xWs As Worksheet
    Dim xArr
    
    On Error Resume Next

    Set xWs = Application.ActiveSheet
    
    Set xCombox = xWs.OLEObjects("TempCombo")
    If Target.Validation.Type <> 3 Then
        If xCombox.Visible Then
            xCombox.Visible = False
        End If
        Exit Sub
    End If
    
    With xCombox
        .ListFillRange = ""
        .LinkedCell = ""
'        .Visible = False
    End With

    Target.Validation.InCellDropdown = False
    Cancel = True
    xStr = Target.Validation.Formula1
    xStr = Right(xStr, Len(xStr) - 1)
    If xStr = "" Then Exit Sub
    With xCombox
        .Visible = True
        .Left = Target.Left
        .Top = Target.Top
        .Width = Target.Width + 5
        .Height = Target.Height + 5
        .ListFillRange = xStr
        If .ListFillRange = "" Then
            xArr = Split(xStr, ",")
            Me.TempCombo.List = xArr
        End If
        .LinkedCell = Target.Address
    End With
    xCombox.Activate
    Me.TempCombo.DropDown

End Sub
Private Sub TempCombo_KeyDown(ByVal KeyCode As MSForms.ReturnInteger, ByVal Shift As Integer)
    Select Case KeyCode
        Case 9
            Application.ActiveCell.Offset(0, 1).Activate
        Case 13
            Application.ActiveCell.Offset(1, 0).Activate
    End Select
End Sub
This comment was minimized by the moderator on the site
I hope now it will be upload
This comment was minimized by the moderator on the site
This code works really well for a single drop down. However, if I have 5 dropdowns using the same list of values but they need to operate independently of each other how is that accomplished? Despite my best efforts, if I put more than one combo box on the page, any selection is one is mirrored in the other.
This comment was minimized by the moderator on the site
Hi Mbuchmeier,Only need one combo box on the page. The code works on all drop-down lists in current page. You just need to manually click on the drop-down list cell to activate the combo box.
This comment was minimized by the moderator on the site
Hi crystal,
I am working with the combo box (The VBA code from 2021/11/05). It is working great and very useful but there are 2 issues:1. Issue #1: Usually when you work on any cell in Excel, there is indication on the row number which indicate which row you work about. When the combo box is opened this indication is missing2.  Issue #2: When the combo box is opened in the last column of the dynamic table, then it isn't  working as usual: when I select value from the list, the cell remain empty until I move the cursor to another cell
Attached screenshot.
Thank in advance
This comment was minimized by the moderator on the site
Hi Yoni,Thanks for your feedback. For the issues you mentioned:1. Issue #1: Excel does not highlight the row number when selecting an object in the worksheet. Since we use a combo box to replace the data validation drop-down list to handle the autocomplete operation, we can't show the indication in this case;2. Issue #2: I have tried as you described, but the problem cannot be reproduced. The screenshot you attached does not display, you need to save the screenshot and uplode it via the "Upload files" button below.
This comment was minimized by the moderator on the site
Hi Crystal,Thanks a lot for your response. Attached the screenshot. hope it will work now
This comment was minimized by the moderator on the site
Hi Yoni,Sorry for the inconvenience. The screenshot you uploaded is still not shown on the page. You need to save the screenshot on your disk in advance and then uplode it via the "Upload files" button. See the attached screenshot.
This comment was minimized by the moderator on the site
will, thank you is not enugh :::: alot of thank you then ;;;;; that worked like magic :)
This comment was minimized by the moderator on the site
Yeah, basically completely useless.  Want the cell to auto-complete when typing in a cell using list data validation.Tried this, and now I have to start over from scratch because I can't Undo it.  Thanks.Also loaded with syntax errors.
This comment was minimized by the moderator on the site
It works as it should be except for two things, first, there is no validation after insertion. i.e. if I typed anything at the combo then clicked enter it will accept the typed value while it should not do this since the data validation is being used to prevent such behaviors and make sure that the entered data is from selected range. Second, at the data validation list, sometimes I use big range with empty cells and select ignore empty at validation list but the combo takes all the range and shows it, will be nice to remove the empty cells from the combo range.
Thanks & hope you can implement these things to make it perfect.
This comment was minimized by the moderator on the site
Hi, AhmedThe VBA below helps to solve the problem of blank cells. Since the Combo box accepts the value that are not in the list, we still can't find a way to solve this problem. Sorry for the inconvenience.
<div data-tag="code">Private Sub Worksheet_SelectionChange(ByVal Target As Range)
'Update by Extendoffice: 2021/11/05
Dim xCombox As OLEObject
Dim xStr As String
Dim xWs As Worksheet
Dim xArr, xArr1
Dim xRg As Range
Dim xSrc As Variant
Dim xI, xJ, xIndex, xCount As Integer

Set xWs = Application.ActiveSheet
On Error Resume Next
Set xCombox = xWs.OLEObjects("TempCombo")
With xCombox
.ListFillRange = ""
.LinkedCell = ""
.Visible = False
End With
If Target.Validation.Type = 3 Then
Target.Validation.InCellDropdown = False
Cancel = True
xStr = Target.Validation.Formula1
xStr = Right(xStr, Len(xStr) - 1)
If xStr = "" Then Exit Sub
Set xRg = Range(xStr)
If xRg Is Nothing Then
xArr1 = Split(xStr, ",")
Else
ReDim xArr1(0 To xRg.Count - 1)
For xI = 0 To xRg.Count - 1
xArr1(xI) = xRg.Item(xI + 1).Value
Next
End If
xI = 0
xCount = UBound(xArr1) + 1
For xJ = 0 To UBound(xArr1)
If Replace(xArr1(xJ), " ", "") = "" Then xCount = xCount - 1
Next
ReDim xArr(0 To xCount - 1)
xIndex = 0
For xJ = 0 To UBound(xArr1)
If Replace(xArr1(xJ), " ", "") <> "" Then
xArr(xIndex) = xArr1(xJ)
xIndex = xIndex + 1
End If
Next
xStr = ""
With xCombox
.Visible = True
.Left = Target.Left
.Top = Target.Top
.Width = Target.Width + 5
.Height = Target.Height + 5
.ListFillRange = xStr
If .ListFillRange = "" Then
'xArr = Split(xStr, ",")
Me.TempCombo.List = xArr
End If
.LinkedCell = Target.Address
End With
xCombox.Activate
Me.TempCombo.DropDown
End If
End Sub
Private Sub TempCombo_KeyDown(ByVal KeyCode As MSForms.ReturnInteger, ByVal Shift As Integer)
Select Case KeyCode
Case 9
Application.ActiveCell.Offset(0, 1).Activate
Case 13
Application.ActiveCell.Offset(1, 0).Activate
End Select
End Sub
This comment was minimized by the moderator on the site
Hi Crystal,
I am working with the combo box (The VBA code from 2021/11/05). It is working great and so useful! thanks a lot.
I found the source of my problem. There was a line of freeze panes which override the combo box.
The only problem now is that the Undo is not working. Any idea?
Thanks in advanced,
Yoni
This comment was minimized by the moderator on the site
Hi,
The code does not support Undo. Sorry for the inconvenience.
This comment was minimized by the moderator on the site
Thanks. Maybe do you know why Worksheet_Change event is not firing once I choose value from the combo box?
This comment was minimized by the moderator on the site
Hi, could you please doublecheck this code, when I use it instead of the dropdown list appearing, the source for the dropdown appears instead. This is the exact function I want, could you please fix it.
This comment was minimized by the moderator on the site
If you use a named range or something similar, like I have with a table column, it will display the named range name instead of the values in that named range. To get what you want, you need to change the xStr to display the worksheet range of that named range, since the .ListFillRange does not take in named ranges directly. This should accomplish it : dim RangeAddress as String: RangeAddress = Range(YourNamedRange).addressand then make the xStr something like this: xStr = "YourWorksheetNameWithTheNamedRangeInIt!" & RangeAddress (important: add the '!' for the sheet reference)
This will make your xStr look something like: NamedRangeSheet!$A$1:$A$5
xStr = Right(xStr, Len(xStr) - 1)

If .ListFillRange = "" Then
xArr = Split(xStr, ",")
Me.TempCombo.List = xArr
End If

with these adjustments your combobox should display the list values instead of the source
This comment was minimized by the moderator on the site
Hi Syu,Sorry I don't quite understand your description. Can you try to be more specific of it?After applying the VBA code mentioned in the above method, when the cell with the data validation drop-down list is checked, the drop-down list turn into a combo box, and then all the items in the list are listed. 
This comment was minimized by the moderator on the site
do you have an example file please?
This comment was minimized by the moderator on the site
Hello. The code is very cool. Please make sure that the formula "INDIRECT" is carried out and displayed. It is very necessary
This comment was minimized by the moderator on the site
The code is not working for a validation list which is created by vba code and the source is a named range
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