Dica: outros idiomas são traduzidos pelo Google. Você pode visitar o English versão deste link.
Entrar
x
or
x
x
Registre-se
x

or

Como criar uma lista suspensa pesquisável no Excel?

Para uma lista suspensa com vários valores, encontrar um bom não é um trabalho fácil. Anteriormente, introduzimos um método de preenchimento automático da lista suspensa ao inserir a primeira letra na caixa suspensa. Além da função de autocompletar, você também pode fazer a lista suspensa pesquisável para melhorar a eficiência de trabalho na busca de valores adequados na lista suspensa. Para fazer a lista suspensa pesquisável, faça como abaixo o tutorial mostra passo a passo.

Crie uma lista suspensa pesquisável no Excel


Pesquise (encontre e substitua) textos facilmente em todas as pastas de trabalho abertas ou em determinadas planilhas:

Clique Kutools > Navegação > Localizar e substituir para procurar rapidamente (encontrar e substituir) textos ou valores em todas as pastas de trabalho abertas ou em determinadas planilhas no Excel. Faça o download gratuito da trilha completa do dia 60 do Kutools for Excel agora!

Kutools for Excel: com mais de 200 complementos úteis do Excel, grátis para tentar sem limitação nos dias 60. Baixe a versão de teste agora!

Guia do Office Habilitar Edição e Navegação por Guias no Office e Facilitar seu Trabalho ...
Kutools for Excel resolve a maioria dos seus problemas e aumenta sua produtividade em 80%
  • Reutilizar qualquer coisa: Adicione as fórmulas, gráficos e outras coisas mais usadas ou complexas aos seus favoritos e reutilize-os rapidamente no futuro.
  • Mais do que recursos de texto 20: Extrair Número da Cadeia de Texto; Extrair ou remover parte dos textos; Converta números e moedas em palavras inglesas ...
  • Mesclar Ferramentas: Várias pastas de trabalho e folhas em um; Mesclar várias células / linhas / colunas sem perder dados; Mesclar linhas duplicadas e soma ...
  • Ferramentas de divisão: Dados divididos em várias folhas com base no valor; Uma pasta de trabalho para vários arquivos Excel, PDF ou CSV; Uma coluna para várias colunas ...
  • Colar pulando Linhas ocultas / filtradas; Contagem e Soma pela cor de fundo; Criar lista de discussão e Envie e-mails pelo valor da célula...
  • Super Filtro: Crie esquemas de filtro avançados e aplique a qualquer folha; tipo por semana, dia, frequência e mais; filtros por negrito, fórmulas, comentário ...
  • Mais de recursos poderosos do 300; Funciona com o Office 2007-2019 e 365; Suporta todos os idiomas; Fácil implantação em sua empresa ou organização.

Crie uma lista suspensa pesquisável no Excel


Por exemplo, os dados de origem que você precisa para a lista suspensa estão no intervalo A2: A9.

Este método requer caixa de combinação em vez da lista suspensa de validação de dados. Para criar uma lista suspensa pesquisável, faça o seguinte.

1. Se você não consegue encontrar o Developer guia na faixa de opções, habilite a guia Desenvolvedor da seguinte maneira.

1). No Excel 2010 e 2013, clique em Envie o > Opções. E no Opções caixa de diálogo, clique em Personalizar Faixa de Opções no painel direito, verifique o Developer caixa e, em seguida, clique no botão OK botão. Ver captura de tela:

2). No Outlook 2007, clique em Office botão> Opções do Excel. No Opções do Excel caixa de diálogo, clique em Populares na barra direita, depois verifique o Mostrar guia Desenvolvedor na Faixa de opções caixa e, finalmente, clique no botão OK botão.

2. Depois de mostrar o Developer guia, clique em Developer > inserção > Caixa combo. Ver captura de tela:

3. Desenhe a caixa de combinação na planilha e clique com o botão direito. Selecione Propriedades no menu do botão direito do mouse.

4. No Propriedades caixa de diálogo, você precisa:

1). Selecione Falso no AutoWordSelect campo;

2). Especifique uma célula no LinkedCell campo. Nesse caso, entramos no A12;

3). Selecione 2-fmMatchEntryNone no MatchEntry campo;

4). Tipo DropDownList no Faixa lista Fill campo;

5). Feche o Propriedades caixa de diálogo. Ver captura de tela:

5. Agora, feche o modo de design clicando Developer > Modo de design.

6. Selecione uma célula em branco C2 e, em seguida, copie e cole a fórmula = - ISNUMBER (IFERROR (SEARCH ($ A $ 12, A2,1), "")) na barra de fórmulas, e pressione a tecla Enter. Eles arrastam para a célula C9 para preencher automaticamente as células selecionadas com a mesma fórmula. Ver captura de tela:

Notas:

1. O $ A $ 12 é a célula que você especificou no campo LinkedCell na etapa 4;

2. Depois de terminar o passo acima, agora você pode testá-lo. Digite uma letra C na caixa suspensa, você verá que todas as células contendo C são preenchidas com o número 1.

7. Selecione a célula D2, coloque a fórmula = IF (C2 = 1, COUNTIF ($ C $ 2: C2,1), "") na barra de fórmulas, e pressione a tecla Enter. Em seguida, arraste o identificador de preenchimento no D2 para baixo para D9 para preencher o intervalo D3: D9.

8. Selecione a célula E2, copie e cole a fórmula =IFERROR(INDEX($A$2:$A$9,MATCH(ROWS($D$2:D2),$D$2:$D$9,0)),"") na barra de fórmulas e pressione a tecla Enter. Em seguida, arraste o identificador de preenchimento em E2 até E9 para preencher as células. Então você verá que as células são preenchidas conforme mostra a tela abaixo.

9. Agora você precisa criar um intervalo de nomes. Por favor clique Fórmula > Definir nome.

10. No Novo nome caixa de diálogo, digite DropDownList para dentro Nome caixa, tipo fórmula =$E$2:INDEX($E$2:$E$9,MAX($D$2:$D$9),1) no Refere-se a caixa e, em seguida, clique no botão OK botão.

11. Agora, ative o modo de design clicando Developer > Modo de design. Em seguida, clique duas vezes na caixa de combinação que você criou no passo 3 para abrir o Microsoft Visual Basic para Aplicações janela.

12. Copie e cole o código VBA abaixo no editor de código.

Código VBA: faça a lista suspensa pesquisável

Private Sub ComboBox1_GotFocus()
	ComboBox1.ListFillRange = "DropDownList"
	Me.ComboBox1.DropDown
End Sub

13. Feche o Microsoft Visual Basic para Aplicações janela.

De agora em diante, quando você começar a digitar na caixa de lista, ele iniciará uma pesquisa ambígua e apenas listará os valores relevantes na lista suspensa.

notas: Depois de fechar e reabrir a planilha, o código VBA que você criou na etapa 12 é removido automaticamente. Então, você precisa salvar esta pasta de trabalho como formato de pasta de trabalho com macro ativado no Excel.


Office Tab - Navegação com guias, edição e gerenciamento de pastas de trabalho no Excel:

O Office Tab traz a interface com guias, como visto em navegadores da web, como o Google Chrome, as novas versões do Internet Explorer e o Firefox para o Microsoft Excel. Será uma ferramenta que economiza tempo e é insubstituível no seu trabalho. Veja abaixo a demonstração:

Clique para a versão gratuita do Office Tab!

Guia do Office para Excel


Artigos relacionados:


Kutools for Excel resolve a maioria dos seus problemas e aumenta sua produtividade em 80%

  • armadilha para peixes: Inserir rapidamente fórmulas complexas, gráficos e qualquer coisa que você tenha usado antes; Criptografar células com senha; Criar lista de endereços e enviar e-mails ...
  • Bar Super Fórmula (facilmente editar várias linhas de texto e fórmula); Layout de leitura (leia e edite facilmente grandes números de células); Colar para intervalo filtrado...
  • Mesclar células / linhas / colunas sem perder dados; Conteúdo de células divididas; Combinar linhas / colunas duplicadas... Prevenir Células Duplicadas; Comparar intervalos...
  • Selecione Duplicado ou Exclusivo Linhas; Selecione linhas em branco (todas as células estão vazias); Super Find e Fuzzy Find em muitos livros de trabalho; Seleção aleatória ...
  • Cópia exata Múltiplas Células sem alterar a referência da fórmula; Criar automaticamente referências para várias folhas; Inserir marcadores, Caixas de seleção e mais ...
  • Extrair texto, Adicionar texto, remover por posição, Remover espaço; Criar e imprimir subtotais de paginação; Converter entre conteúdo de células e comentários...
  • Super Filtro (salve e aplique esquemas de filtro a outras planilhas); Classificação Avançada por mês / semana / dia, frequência e mais; Filtro especial por negrito, itálico ...
  • Combinar pastas de trabalho e planilhas; Mesclar tabelas com base em colunas-chave; Dividir dados em várias planilhas; Lote Converter xls, xlsx e PDF...
  • Mais de recursos poderosos do 300. Suporta Office / Excel 2007-2019 e 365. Suporta todos os idiomas. Fácil implantação em sua empresa ou organização. Recursos completos Avaliação gratuita de um dia de 30.
kte tab 201905

A guia Office traz a interface com guias para o Office e torna seu trabalho muito mais fácil

  • Ativar edição e leitura com guias no Word, Excel, PowerPoint, Publisher, Access, Visio e Project.
  • Abra e crie vários documentos em novas guias da mesma janela, em vez de em novas janelas.
  • Aumenta sua produtividade em 50% e reduz centenas de cliques do mouse para você todos os dias!
fundo officetab
Say something here...
symbols left.
You are guest ( Sign Up? )
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.
    ismaeel ahmad · 1 months ago
    how to use this dropdown in vba form any konw please reply
  • To post as a guest, your comment is unpublished.
    Jeroen · 1 months ago
    Hi, I made an action list for internal use with automatic email reminders in Excel, based on macro and vba. in a cell you select which person to send the reminder to, in a next cell you select which person to CC etc. Is it a good idea to copy this dropdownlist a few 100 times to every possible entry that I supply ? And is it possible to add a rule: Per row a particular person can only be selected once?
  • To post as a guest, your comment is unpublished.
    Ajesh · 1 months ago
    I have around 80000 data while running excel is hang
  • To post as a guest, your comment is unpublished.
    Sourav Singha · 2 months ago
    Sir How to use this in excel userform combobox....? plz help
    • To post as a guest, your comment is unpublished.
      crystal · 2 months ago
      Hi Sourav Singha,
      Can't use it in a userform combobox. Sorry for the inconvenience.
  • To post as a guest, your comment is unpublished.
    Josh · 4 months ago
    Is there a way to make it call up a hyperlink? My email is joshuarobertdaniels@gmail.com
    • To post as a guest, your comment is unpublished.
      crystal · 2 months ago
      Hi Josh,
      Sorry can;t help you with that yet.
  • To post as a guest, your comment is unpublished.
    Vrezh · 5 months ago
    I have a problem. My list is in Armenian language, and I see ??????-s instead of the letters. how can I fix this problem? Thank you in advance
    • To post as a guest, your comment is unpublished.
      crystal · 4 months ago
      Hi Vrezh,
      Sorry this kind of problem can't be solved yet. Thank you for your comment.
  • To post as a guest, your comment is unpublished.
    Steve Olah · 8 months ago
    How can I use this? I have two problem
    1st I would like use ComboBox1 for a full column, so I have D column, it should see empty.
    When I click into a cell in D column example D7 or D8(etc) I should get a Combo in D7 or D8 etc cell and after select just see the result, not the combo too.

    But how can I add combobox dynamically to D2, D4, D11 etc when click or before.
    I need for I can search with typing too, so simple(not active-x) combo is wrong.

    2nd how set padding? - my combo text when I search is not see whole because itt has padding.

    3th if my source is C column, how drop empty elements from list
  • To post as a guest, your comment is unpublished.
    sigidapurnomo purnomo · 1 years ago
    I had try tutorial drodown list searchable, Some like that,. But i'am can't make searcable from list and Combo Box Search??? How to make VBA Macro Connected in Excel??
  • To post as a guest, your comment is unpublished.
    Mubashir · 1 years ago
    I want to make this drop down to work for whole column, so that with multiple entries, I have this search suggestion option available every time. Above option, just shows suggestion for one time. Please help
  • To post as a guest, your comment is unpublished.
    Min · 1 years ago
    Hi. I get many helps from your post. However, it doesn't make automatic dropdown if there are mixed language on the list (e.g: first cell is written in English, second cell is written in Korean etc.) Has anyone had solve this problem?
  • To post as a guest, your comment is unpublished.
    dan · 1 years ago
    The automatic dropdown list is not working. Everything else is working. Do you know where my snag might lie?
    • To post as a guest, your comment is unpublished.
      dan · 1 years ago
      I figured it my be with the last step. I put the VBA code in my personal.xlsb worksheet but looks like the code needs to be on the sheet of the respective workbook. hazah
  • To post as a guest, your comment is unpublished.
    michael cianci · 1 years ago
    I got this to work but for some reason excel crashes if i attempt to use the arrows to select things from the drop down. has anyone had this issue? is it even supposed to be possible?
    thanks
    • To post as a guest, your comment is unpublished.
      crystal · 1 years ago
      Dear Michael,
      The problem you mentioned does not appear in my case. Which Office version do you use?
      • To post as a guest, your comment is unpublished.
        yogi · 1 years ago
        Dear Crystal,

        I got the same problem as michael does, excel crashes every time i use down arrow in the drop box, i got excel 2010 on my laptop, which version do you use?
        • To post as a guest, your comment is unpublished.
          crystal · 1 years ago
          Hi yogi,
          The method has been successfully tested in Office 2010, 2013 as well as 2016. No idea for this problem. Sorry about that.
  • To post as a guest, your comment is unpublished.
    alluxxx · 1 years ago
    Is there a way to prioritize the location of a letter in a word? I used this method, but when I type in "A," for example, I get terms with "A" anywhere in the word. I would prefer if it started showing all the terms that begin with "A". Is this possible?
    • To post as a guest, your comment is unpublished.
      crystal · 1 years ago
      Hi,
      Sorry for reply so late. If you want to search values in drop-down list that begin with a certain character, please change the formula in column C to
      =--ISNUMBER(IFERROR(SEARCH($A$12,MID(A3,1,1),1),"")).
      Thank you for your comment.
  • To post as a guest, your comment is unpublished.
    KATHLEEN · 1 years ago
    I may have misunderstood how this function is supposed to work, but i can only get the combo box search to populate one cell, A12 (using the example from the tutorial). If i click into A13 to populate the next cell with a different value from the drop down, it just replaces what i have in A12 and does not populate A13. I need this search to apply to any cell in column A from A12 down. Have i done something incorrect or does this combo box search only allow a single cell in the workbook to be populated with the result? Will be grateful for any help with this.
  • To post as a guest, your comment is unpublished.
    Kathleen · 1 years ago
    I may have misunderstood how this function is supposed to work, but i can only get the combo box search to populate one cell, A12 (using the example from the tutorial). If i click into A13 to populate the next cell with a different value from the drop down, it just replaces what i have in A12 and does not populate A13. I need this search to apply to any cell in column A from A12 down. Have i done something incorrect or does this combo box search only allow a single cell in the workbook to be populated with the result? Will be grateful for any help with this.
    • To post as a guest, your comment is unpublished.
      crystal · 1 years ago
      Good Day,
      This combo box search only allow a single cell in the workbook to be populated with the result.
      I'll try to find another method to solve your problem.
  • To post as a guest, your comment is unpublished.
    Ben Johnston · 1 years ago
    I feel dumb, but immediately after posting, I realized I probably hadn't added the 1 to DropDownList1 in the VBA, and sure enough that was the problem! Thanks anyway!
  • To post as a guest, your comment is unpublished.
    Ben Johnston · 1 years ago
    Hello, thanks for the tutorial! I'm having an issue where every time I type in the combo box, "DropDownList1" disappears from the "ListFillRange" property. So long as I don't type in the box, if I retype "DropDownList1" in the property, the box does show suggestions. I have looked everything over and could not find any errors. Is this a common problem, and is there a way to fix it? Thank you for your time!
    • To post as a guest, your comment is unpublished.
      crystal · 1 years ago
      Dear Ben,
      I am also comfusing about the disappearing of the "DripDownList" from the "ListFillRange" property
      But it does not influence the finally rsult of making the drop-down list seachable.
  • To post as a guest, your comment is unpublished.
    dave · 2 years ago
    is there a way to have the search box put the top result if left blank? in the case of this example it would automatically put china if it was left blank
    • To post as a guest, your comment is unpublished.
      crystal · 2 years ago
      Dear dave,
      Would you please provide a screenshot of your spreadsheet showing what you are exactly trying to do?
  • To post as a guest, your comment is unpublished.
    Al B · 2 years ago
    I've had an ongoing issue with all documents I've used this method on. A shadow of the drop-down box reappears underneath it each time I click into another cell within the spreadsheet and begin typing. It's beyond just a nuisance because when the shadow drops down, it prevents use of any additional searchable drop-down boxes. Please help!!! This is affecting multiple documents we use throughout our organization.
    • To post as a guest, your comment is unpublished.
      crystal · 2 years ago
      Good day,
      Sorry for replying so late. The problem you methoded does not appear in my case.Would be nice if you could provide your Office verson. Thank you!
  • To post as a guest, your comment is unpublished.
    Gunawan Budianto · 2 years ago
    4. In the Properties dialog box, you need to:
    1). Select False in the AutoWordSelect field;
    2). Specify a cell in the LinkedCell field. In this case, we enter A12;

    Why A12? thank's
    • To post as a guest, your comment is unpublished.
      crystal · 2 years ago
      Hi,
      This cell is optionally selected which can help to finish the whole operation. You can choose any one as you need.
  • To post as a guest, your comment is unpublished.
    Jelbin · 2 years ago
    Hi As in forum,
    I need to have this searchable dropdown for columns 2 to 500. Please let me know how i can as the second combo replicates the same in first which i dont want
    • To post as a guest, your comment is unpublished.
      crystal · 2 years ago
      Dear Jelbin,
      Can't handle this. Sorry about that.
  • To post as a guest, your comment is unpublished.
    Havocknox · 2 years ago
    Thank you for this breakdown to make the combo box searchable. I have even gotten three of them working on the same page. My problem I have run into is when I start typing in the search information and the info narrows down, if I hit the down arrow key to select the item in the list Excel crashes on me. Has anyone had this happen, and if so have you found a way to solve this issue.
    • To post as a guest, your comment is unpublished.
      crystal · 2 years ago
      Hi,
      The problemm you mentioned does not appear in my case. Would you please provide your Office version?
  • To post as a guest, your comment is unpublished.
    Heric · 2 years ago
    Hi,

    your guide is most helpful, but i still encounter one last problem.
    I am trying to do a simple invoice, and do the drop down for my customer name cell, must my customer listing be in the same worksheet as my invoice worksheet? Is is possible i have two worksheet, "invoice" & "customer name", and do the drop down list for customer name at "invoice" worksheet?

    Thank you
  • To post as a guest, your comment is unpublished.
    Jaydie · 2 years ago
    Thank you, I used above and it works perfectly....

    Until you have two combo boxes in one sheet.. When you want to type in the second combo box it highlights the text in the first combo box and does not want to search
    If I leave the first box blank, the second box works fine

    Please help
  • To post as a guest, your comment is unpublished.
    NAJMA · 2 years ago
    plz help me
    i cannt enter formula in formula bar
    when i paste this formula & paste this =--ISNUMBER(IFERROR(SEARCH($A$12,A2,1),""))
    give me error.type :(
  • To post as a guest, your comment is unpublished.
    Ashok · 2 years ago
    HI, How to do the same searchable program for contnious rwo , i tried and it is working one row only , i want to do the same for below row also for different name
  • To post as a guest, your comment is unpublished.
    Ahmed Shahin · 2 years ago
    Hi Herb,

    What if i created a drop down list from another work sheet? the formula " =--ISNUMBER(IFERROR(SEARCH($A$2,H2,1),""))" has wrong reference and when i edit it it doesn't allow to put the right cell. what do you suggest? thank you
  • To post as a guest, your comment is unpublished.
    Yesenia · 3 years ago
    I, like Cristina above, would also like to know how to make multiple combo boxes for one sheet. I tried but when I begin typing in the second combobox two things happen: 1. no drop down list appears, and 2. the simple act of typing in combobox2 activates the selection from my original combobox1 and highlights it in the drop down from combobox1. I checked to make sure all of my coding says combobox2 for combobox2 etc. for the other boxes but there is a disconnect that I can't figure out.
    • To post as a guest, your comment is unpublished.
      Jaydie · 2 years ago
      I have the exact same problem, have you managed a solution yet??
  • To post as a guest, your comment is unpublished.
    FAUZI · 3 years ago
    Thank You.. Very helpfull.. God Bless You
  • To post as a guest, your comment is unpublished.
    Maarten · 3 years ago
    Hi,

    I can't fill in 'DropDownList' in the 'ListFillRange'.... What's the catch? I don't understand the solution of imad.
    Thanks.
    • To post as a guest, your comment is unpublished.
      Herb123987 · 3 years ago
      [quote name="Maarten"]Hi,

      I can't fill in 'DropDownList' in the 'ListFillRange'.... What's the catch? I don't understand the solution of imad.
      Thanks.[/quote]

      I posted this answer above for IMAD and saw this posting down here for MAARTEN so I figured I'd post this for him too.

      I have seen this "how to make an autofill / auto suggest DDL / combo box" on a few different sites and they ALL want you to put "something" in the ListFillRange Properties field [b]BEFORE[/b] they have you [b]create a named range[/b] by clicking Formula > Define Name ....... and the [b]ListFillRange will always go blank in the Properties window[/b] UNTIL you define the name (Formula > Define Name)

      THAT is why i think IMAD, above and MAARTEN below (here) was having the problem - not 100% sure though.
      • To post as a guest, your comment is unpublished.
        Maarten · 3 years ago
        Hi there,

        Thanks a lot for your solution. I gave up already, but I'll try again.
    • To post as a guest, your comment is unpublished.
      Andone · 3 years ago
      try to put this=--ISNUMBER(IFERROR(SEARCH($A$12,$A$2,1),"")) instead =--ISNUMBER(IFERROR(SEARCH($A$12,A2,1),"")) in step 6
  • To post as a guest, your comment is unpublished.
    imad · 3 years ago
    So I Finally got it to work! I attached the linkedcell to a vlookup and got all the information pulling into a row. I was wondering if there could be any extension on the vba to actually filter the table as we type?
  • To post as a guest, your comment is unpublished.
    imad · 3 years ago
    Mine isn't working. My dropdownlist label was not working in the "properties" for the combobox. Everytime I entered it, it disappeared. So I used "test" instead. I adjusted the macro with the word test instead of dropdowmlist. Let me know if there is something else I can do? Search not working.
    • To post as a guest, your comment is unpublished.
      Herb123987 · 3 years ago
      [quote name="imad"]Mine isn't working. My dropdownlist label was not working in the "properties" for the combobox. Everytime I entered it, it disappeared. So I used "test" instead. I adjusted the macro with the word test instead of dropdowmlist. Let me know if there is something else I can do? Search not working.[/quote]

      I have seen this "how to make an autofill / auto suggest DDL / combo box" on a few different sites and they ALL want you to put "something" in the ListFillRange field BEFORE they have you create a name range by clicking Formula > Define Name and the ListFillRange will always go blank in the Properties window UNTIL you define the name (Formula > Define Name)

      THAT is why i think IMAD, above and MAARTEN below was having the problem - not 100% sure though.
  • To post as a guest, your comment is unpublished.
    MarkC · 4 years ago
    For some reason when I click a selection from the drop down list after typing a few characters the drop down main value becomes blank... any idea why this would happen and how to get it to stop?

    I have a command button that I want to click to then put the selection into the next available cell in a given range, but again the value blanks out when I click on it.
    • To post as a guest, your comment is unpublished.
      imad · 3 years ago
      I have the exact same problem. I did everything right but the dropdownlist label just goes blank everytime I press enter. If you figured it out, please do share!
  • To post as a guest, your comment is unpublished.
    Cristina · 4 years ago
    Excellent post. Could you please explain how do you copy the same drop down list to multiple cells. I want to create an expense report and I want to be able to select a different expense on each row from the same drop down list. Thank you.
  • To post as a guest, your comment is unpublished.
    Prastuti · 4 years ago
    very nicely explained. Loved it. Thank you !!