Note: The other languages of the website are Google-translated. Back to English
로그인  \/ 
x
or
x
회원가입  \/ 
x

or

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

큰 항목이있는 데이터 유효성 검사 드롭 다운 목록이있는 경우 적절한 항목을 찾기 위해 목록에서 위아래로 스크롤하거나 전체 단어를 목록 상자에 직접 입력해야합니다. 드롭 다운 목록에 첫 글자를 입력 할 때 자동 완성을 허용하는 방법이 있다면 모든 것이 더 쉬워 질 것입니다. 이 자습서에서는이를 달성하는 데 도움이되는 VBA 방법을 제공합니다.

VBA 코드로 드롭 다운 목록에 입력 할 때 자동 완성
드롭 다운 목록에 대한 추가 자습서 ...


VBA 코드로 드롭 다운 목록에 입력 할 때 자동 완성

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

먼저 워크 시트에 콤보 상자를 삽입하고 속성을 변경해야합니다.

1. 자동 완성 할 드롭 다운 목록 셀이 ​​포함 된 워크 시트를 엽니 다.

2. 콤보 상자를 삽입하기 전에 Excel 리본에 개발 도구 탭을 추가해야합니다. 개발자 탭이 리본에 표시되면 3 단계로 이동. 그렇지 않으면 다음을 수행하십시오. 입양 부모로서의 귀하의 적합성을 결정하기 위해 미국 이민국에 > 옵션 를 열려면 옵션 창문. 이것에 Excel 옵션 창을 클릭합니다 리본 맞춤 설정 왼쪽 창에서 개발자 상자를 클릭 한 다음 OK 단추. 스크린 샷보기 :

3. 클릭 개발자 > 끼워 넣다 > 콤보 상자 (ActiveX 컨트롤).

4. 현재 워크 시트에 콤보 상자를 그립니다. 마우스 오른쪽 버튼으로 클릭 한 다음 등록 오른쪽 클릭 메뉴에서.

5. 에서 등록 대화 상자의 원본 텍스트를 바꾸십시오. (이름) 필드 TempCombo.

6. 전원 끄기 디자인 모드 클릭하여 개발자 > 디자인 모드.

그런 다음 아래 VBA 코드를 적용하십시오

7. 현재 시트 탭을 마우스 오른쪽 버튼으로 클릭하고 코드보기 상황에 맞는 메뉴에서. 스크린 샷보기 :

8. 오프닝에서 응용 프로그램 용 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

9. 프레스 다른 + Q 키를 동시에 닫아 Microsoft Visual Basic 애플리케이션 창.

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

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

Excel에서 확인란을 사용하여 드롭 다운 목록을 쉽게 만들 수 있습니다.

그리고, 확인란이있는 드롭 다운 목록 ~의 유용성 Excel 용 Kutools 필요에 따라 지정된 범위, 현재 워크 시트, 현재 통합 문서 또는 열려있는 모든 통합 문서의 확인란이있는 드롭 다운 목록을 쉽게 만들 수 있습니다.
지금 다운로드하여 사용해보십시오! (30 일 무료 트레일)


관련 기사 :

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

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

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

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

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


최고의 사무 생산성 도구

Excel 용 Kutools는 대부분의 문제를 해결하고 생산성을 80 % 향상시킵니다.

  • 재사용: 빠르게 삽입 복잡한 공식, 차트 그리고 이전에 사용한 모든 것; 셀 암호화 암호로; 메일 링리스트 생성 이메일 보내기 ...
  • 슈퍼 포뮬러 바 (여러 줄의 텍스트와 수식을 쉽게 편집 할 수 있습니다.) 레이아웃 읽기 (많은 수의 셀을 쉽게 읽고 편집합니다.) 필터링 된 범위에 붙여 넣기...
  • 셀 / 행 / 열 병합 데이터 손실없이; 셀 내용 분할; 중복 행 / 열 결합... 중복 셀 방지; 범위 비교...
  • 중복 또는 고유 선택 행; 빈 행 선택 (모든 셀이 비어 있음); 슈퍼 찾기 및 퍼지 찾기 많은 통합 문서에서; 무작위 선택 ...
  • 정확한 사본 수식 참조를 변경하지 않고 여러 셀; 참조 자동 생성 여러 시트에; 글 머리 기호 삽입, 확인란 등 ...
  • 텍스트 추출, 텍스트 추가, 위치 별 제거, 공간 제거; 페이징 부분합을 만들고 인쇄합니다. 셀 내용과 주석 간 변환...
  • 슈퍼 필터 (다른 시트에 필터 구성표 저장 및 적용) 고급 정렬 월 / 주 / 일, 빈도 등 특수 필터 굵은 기울임 꼴로 ...
  • 통합 문서와 워크 시트 결합; 키 열을 기반으로 테이블 병합; 데이터를 여러 시트로 분할; xls, xlsx 및 PDF 일괄 변환...
  • 300 개 이상의 강력한 기능. Office / Excel 2007-2019 및 365를 지원합니다. 모든 언어를 지원합니다. 기업 또는 조직에 쉽게 배포 할 수 있습니다. 전체 기능 30 일 무료 평가판. 60 일 환불 보장.
kte 탭 201905

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

  • Word, Excel, PowerPoint에서 탭 편집 및 읽기 사용, Publisher, Access, Visio 및 Project.
  • 새 창이 아닌 동일한 창의 새 탭에서 여러 문서를 열고 만듭니다.
  • 생산성을 50 % 향상시키고 매일 수백 번의 마우스 클릭을 줄입니다!
officetab 하단
Say something here...
symbols left.
You are guest
or post as a guest, but your post won't be published automatically.
Loading comment... The comment will be refreshed after 00:00.
  • To post as a guest, your comment is unpublished.
    Nat · 17 days ago
    Thank you, this worked for me.
  • To post as a guest, your comment is unpublished.
    Jesus Bermudez · 1 months ago
    Hi, thanks for your code. I have a problem, It's not working. My data for the validation list is in other sheet (Also is a excel table Ctrl + T because I need enter new data every day), I dont know if any of these are the problem. Can you help me with this?
  • To post as a guest, your comment is unpublished.
    opalmagic · 1 months ago
    @stefany Check out the world's best site for selling opal rings opal jewelry
  • To post as a guest, your comment is unpublished.
    stefany · 2 months ago
    hi, thanks for your code. I would like to autocomplete and make multiple selections in a drop down list. Can you help me please?, thank you
  • To post as a guest, your comment is unpublished.
    Dilshan · 2 months ago
    @crystal Hi,
    I am trying to pull that list data from another sheet but it does not work. below is my code
    Private Sub Worksheet_SelectionChange(ByVal Target As Range)
    'Update by Extendoffice: 20190812
    Dim xCombox As OLEObject
    Dim xStr As String
    Dim xWs As Worksheet
    Dim xArr
    Dim xRgStr As String
    Dim xRg As Range
    xRgStr = "MAINInput!$D:$D"
    'MAINInput = sheet name where the list is available


    Set xWs = Application.ActiveSheet
    On Error Resume Next
    Set xCombox = xWs.OLEObjects("cmbEmployee")
    With xCombox
    .ListFillRange = ""
    .LinkedCell = ""
    .Visible = False
    End With
    Set xRg = Intersect(Range(xRgStr), Target)
    If xRg Is Nothing Then Exit Sub
    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.cmbEmployee.List = xArr
    End If
    .LinkedCell = Target.Address
    End With

    xCombox.Activate
    Me.cmbEmployee.DropDown
    End If
    End Sub
    Private Sub cmbEmployee_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
  • To post as a guest, your comment is unpublished.
    wendy · 5 months ago
    @crystal I have done that - saved as a macro-enabled workbook but it still all disappears when you close the file. Thanks, Wendy

  • To post as a guest, your comment is unpublished.
    crystal · 6 months ago
    @taras.samolyuk Good day,
    Would you provide a screenshot of what you are trying to do?
  • To post as a guest, your comment is unpublished.
    krish · 6 months ago
    Hello thanks for the code it works great.
    But i want to auto expand drop down list when i move to next cell by pressing enter key without clicking on arrow button (or) alt+down.
    Thanks in advance.
  • To post as a guest, your comment is unpublished.
    taras.samolyuk · 6 months ago
    Hello, is there a chance to add dependency to select date and in the next column to the proposed choices?
  • To post as a guest, your comment is unpublished.
    Christiam Alfonzo · 6 months ago
    como hago para agregar esta función
    =INDIRECTO("tabla1[columna]")
    al código
    • To post as a guest, your comment is unpublished.
      Ben · 15 days ago
      @Christiam Alfonzo @Crystal I'm having the same problem. One of my lists uses an INDIRECT formula (based on what they choose in the first column) to generate the list. With this code, now the formula appears instead of the list.
  • To post as a guest, your comment is unpublished.
    crystal · 6 months ago
    @Danielle Hi,
    The code works well in my case. It is not easy to figure out the problem as you described above. Would you mind sending your worksheet to my email address?
  • To post as a guest, your comment is unpublished.
    Danielle · 6 months ago
    I tried to use this method. I added the code. After that I add the range needed. Looks all fine. Then I test and the combobox dissapears directly after filling it. So the code works, but its not usable. What do I do wrong?
    Kind regards, Danielle
  • To post as a guest, your comment is unpublished.
    coltan123 · 8 months ago
    Code is working , but data validation is not working. For example, when i set the data validation to be red/bue/yellow, it does not show error message when i type green
  • To post as a guest, your comment is unpublished.
    crystal · 9 months ago
    @Mhyk Hi,
    Methods in this tutorial can do you a favor:
    How To Auto Populate Other Cells When Selecting Values In Excel Drop Down List?
    https://www.extendoffice.com/documents/excel/2400-excel-drop-down-list-auto-populate.html
  • To post as a guest, your comment is unpublished.
    Mhyk · 9 months ago
    Hi I have some difficulties with my excel work. I would like to know if there is a method to autofill the cell I desire?
    Example
    1 = san pedro
    2 = santa rosa
    3 = calamba
    4 = san pablo
    and so on.

    I have a list with correspoding numbers. If I input number 1 in Cell A5 I would like it to automatically fill the Cell B5 with its corresponding list name (san pedro) and if I input 3 in A5, B5 will be = calamba.
    thank you. for the help, Im having trouble to find a solution to this hope to find answers.
    Thank you and God Bless.


  • To post as a guest, your comment is unpublished.
    Sisi · 9 months ago
    Hi Guys,


    I have made 2 different drop down list searchable in 1 sheet, the fist is working well but the second drop down list is showing me the formula of indirect as the second drop down list is indirect of the first. I have apply the VBA with combo and so on but still the second list is showing me the formula. how to I fix this?
  • To post as a guest, your comment is unpublished.
    Simona Muresan · 9 months ago
    Hi Guys,


    I have made 2 different drop down list searchable in 1 sheet, the fist is working well but the second drop down list is showing me the formula of indirect as the second drop down list is indirect of the first. I have apply the VBA with combo and so on but still the second list is showing me the formula. how to I fix this?

  • To post as a guest, your comment is unpublished.
    Alistair · 9 months ago
    @crystal Hi there, this is a great solution, but for some reason, in the original code, the combox was hidden when the cell with the data validation was not active, and only visible when the cell was selected.
    With this code, we get undo back, which is perfect, but the combox does not auto-hide again when you click off.
    Do you have a solution for this?

    Thanks,

    Alistair
  • To post as a guest, your comment is unpublished.
    Donald · 10 months ago
    @crystal Hi Cristal, great answer. Now if on the same worksheet I want to add another combo box that calls data from a third sheet, how would the code look like as I tried and got no result. I will appreciate your support. Donald
  • To post as a guest, your comment is unpublished.
    crystal · 10 months ago
    @Leonardo Hi Leonardo,
    The VBA works for all data validation drop down lists in the worksheet.
  • To post as a guest, your comment is unpublished.
    Juan Carlos · 10 months ago
    Hello, I have a problem with this method and I already use a list validated with an indirect function to refer to the range of a table and when applying this macro it shows me only the indirect formula in the list! How could I solve this problem?
  • To post as a guest, your comment is unpublished.
    Leonardo · 10 months ago
    Hi! Is it possible to disable the combo box scrolling list when I click on the cell? and leave it active only if I click on the arrow, thanks!
  • To post as a guest, your comment is unpublished.
    Leonardo · 10 months ago
    Hello, is it possible to replicate this in a complete column? I mean that each individual row of a column has this possibility or at least 1000 rows in a simple way. Thank you!
  • To post as a guest, your comment is unpublished.
    ahmad zaid · 10 months ago
    @crystal It's work in cell with list but when i move or tap or select any cell with no list ..the up message talked you about always show..

  • To post as a guest, your comment is unpublished.
    crystal · 10 months ago
    @Rohit Hi Rohit,
    After applying the code, please save the workbook as an Excel Macro-Enabled Workbook before closing the file.
  • To post as a guest, your comment is unpublished.
    gurita_22 · 10 months ago
    If you use this method with one combobox/sheet i guess it's flawless.

    I used this method with three comboboxes on one sheet with 3 different ListFillRange.
    Dropdown keep showing up on different combobox than what i'm typing in.
    1. I type and select correctly from the first.
    2. When i go to second combo, the third dropdown pops up.(I have to select the"", as it is still empty)
    then i can search my second combobox.
    3. When i go to the third, the first dropdown pops up, I reselect the only item(as there is only one that was already selected in the first step)
    After this i can add the content in the third dropdown.



    All subs are on sheet1's vba window.
    Now i'm trying to spit code in different modules, but can't really make it work.
    Search works, but i always have to push the dropdown arrow to see available results to select. Dropdown doesn't pop up at all.

    using 365, but i have to make "sheet" work on excel 2010
  • To post as a guest, your comment is unpublished.
    Rohit · 10 months ago
    The command works when first applied. But after saving the file, when i reopen it the drop down itself disappears.
  • To post as a guest, your comment is unpublished.
    crystal · 10 months ago
    @ahmadzaid Hi,
    I tried the VBA in Excel 2010 and it works well.
    The drop down list should be data validation drop-down list which is created by clicking Data > Data Validation....
  • To post as a guest, your comment is unpublished.
    ahmadzaid · 11 months ago
    @crystal I get an error message (1004) - the debug highlights ‘If Target.Validation.Type =3 Then’


    fo info. I use excel 2010
  • To post as a guest, your comment is unpublished.
    ahmadzaid · 11 months ago
    I get an error message (1004) - the debug highlights ‘If Target.Validation.Type =3 Then’


    for info .. I use excel 2010

  • To post as a guest, your comment is unpublished.
    crystal · 11 months ago
    @Carlos Hi Carlos,
    Remove the "cancel = true" line from the VBA, then try again.
  • To post as a guest, your comment is unpublished.
    Carlos · 11 months ago
    @crystal Hi. Office 365 Pro Plus
  • To post as a guest, your comment is unpublished.
    crystal · 11 months ago
    @Carlos Hi Carlos,
    Which Excel version are you using?
  • To post as a guest, your comment is unpublished.
    Carlos · 11 months ago
    Hi! Thanks for this code!

    I'm getting a compile error saying "variable not defined", it highlights the "cancel = true" line
  • To post as a guest, your comment is unpublished.
    crystal · 11 months ago
    @Reinaldo Yajure Hi Reinaldo Yajure,
    Please apply the below VBA code. The problem is fixed. Sorry for the inconvenience.

    Private Sub Worksheet_SelectionChange(ByVal Target As Range)
    'Update by Extendoffice: 2020/05/19
    Dim xCombox As OLEObject
    Dim xStr As String
    Dim xWs As Worksheet
    Dim xArr

    Set xWs = Application.ActiveSheet
    On Error Resume Next
    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 xCombox = xWs.OLEObjects("TempCombo")
    With xCombox
    .ListFillRange = ""
    .LinkedCell = ""
    .Visible = False
    End With
    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
  • To post as a guest, your comment is unpublished.
    Mitchell · 1 years ago
    Hi Crystal,

    Absolutely perfect and thank you for the code. However when i press enter the cell automatically goes down. How can I make the cell go to the right when I press enter?

    MItchell

  • To post as a guest, your comment is unpublished.
    crystal · 1 years ago
    @Sergio Hi Sergio,
    The method in this article can help you:
    How To Create A Searchable Drop Down List In Excel?
    https://www.extendoffice.com/documents/excel/2439-excel-drop-down-list-search.html
  • To post as a guest, your comment is unpublished.
    crystal · 1 years ago
    @Sandeep Sharma Hi Sandeep Sharma,
    In the Properties dialog box of the Combo box (step 5 of this tutorial), please find the ListRows field and then change the number 8 to 12 under the Alphabetic tab.
  • To post as a guest, your comment is unpublished.
    Sergio · 1 years ago
    Hi,

    Is it possible to show the matches with the caracter your typping using this code and format of combox?

    Example:

    You have a list with Onion, Black Onion, Green Onion, Red Onion...

    And in the combox you type: "On", so the drop down list show all the values existing on the list that matchs with "On".

    Thanks
  • To post as a guest, your comment is unpublished.
    Reinaldo Yajure · 1 years ago
    When I applied this code to my worksheet, the Undo function is disabled (but only for this sheet in the workbook) -- is there a way to fix this so that undo can still be used?
  • To post as a guest, your comment is unpublished.
    Sandeep Sharma · 1 years ago
    is there any way to increase the list size as it is showing up only 10 line items as i have 12 lines
  • To post as a guest, your comment is unpublished.
    crystal · 1 years ago
    @Jonas Hi Jonas,
    The Tab key and the Enter key can work normally. But can't help with the Arrows yet. Sorry for the inconvenience.
  • To post as a guest, your comment is unpublished.
    Jonas · 1 years ago
    How can I Use Tab/Arrows/Enter to move to another cell once the current cell is filled? Thanks
  • To post as a guest, your comment is unpublished.
    Jonas · 1 years ago
    @crystal It doesnt work for me either, I can still enter items that are not on the list. can you please help!
  • To post as a guest, your comment is unpublished.
    Ramitha · 1 years ago
    Hi . It is a very useful code . However , I cannot use it on horizontal tables which are is a reference for vertical drop downs. Is there a solution ?
  • To post as a guest, your comment is unpublished.
    K1000z · 1 years ago
    @crystal Looks good.Thanks Crystal.
  • To post as a guest, your comment is unpublished.
    crystal · 1 years ago
    @K1000z Hi,
    If you only want the column H to be affected, please try the below VBA code. But it is only available in one worksheet. For multiple sheets, you need to add the code to each sheet code window. Hope I can help.

    Private Sub Worksheet_SelectionChange(ByVal Target As Range)
    'Update by Extendoffice: 2019/8/14
    Dim xCombox As OLEObject
    Dim xStr As String
    Dim xWs As Worksheet
    Dim xArr
    Dim xRgStr As String
    Dim xRg As Range
    xRgStr = "H:H"

    Set xWs = Application.ActiveSheet
    On Error Resume Next
    Set xCombox = xWs.OLEObjects("TempCombo")
    With xCombox
    .ListFillRange = ""
    .LinkedCell = ""
    .Visible = False
    End With
    Set xRg = Intersect(Range(xRgStr), Target)
    If xRg Is Nothing Then Exit Sub
    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
  • To post as a guest, your comment is unpublished.
    crystal · 1 years ago
    @Jerome Hi Jerome,
    The Tab key still works well in my case after applying the code. Which Excel version are you using?
  • To post as a guest, your comment is unpublished.
    crystal · 1 years ago
    @Don P. Hi Don P.
    Only the 1-MatchEntryComplete option can make it work. Sorry can't help you for that.
  • To post as a guest, your comment is unpublished.
    crystal · 1 years ago
    @Billy Hi Billy,
    Which Excel version are you using?