Բաց թողնել հիմնական բովանդակությունը

Ստեղծեք որոնման տուփ Excel-ում – քայլ առ քայլ ուղեցույց

Creating a search box in Excel enhances the functionality of your spreadsheets by making it easier to filter and access specific data quickly. This guide covers several methods to implement a search box, catering to different versions of Excel. Whether you're a beginner or an advanced user, these steps will help you set up a dynamic search box using features like the FILTER function, Conditional Formatting, and various formulas.


Easily create a search box with the FILTER function

ՆշումՄանրամասն FILTER ֆունկցիան հասանելի է Excel 2019 և ավելի ուշ տարբերակներ, Ինչպես նաեւ Excel Microsoft 365-ի համար.
The FILTER function provides a straightforward way to dynamically search and filter data. The benefits of using the FILTER function are:
  • This function automatically updates the output as your data changes.
  • The FILTER function can return any number of results, from a single row to thousands, depending on how many entries in your dataset match the criteria you've set.

Here I will show you how to use the FILTER function to create a search box in Excel.

Step 1: Insert a text box and configure properties
Ակնարկ: If you only need to type in a cell to search for content and don’t require a prominent search box, you can skip this step and proceed directly to Քայլ 2.
  1. Կարդացեք Երեվակիչ էջանշանը, սեղմեք Տեղադրել > Տext Box (ActiveX Control).
    Ակնարկ: Եթե Երեվակիչ tab is not shown on the ribbon, you can enable it by following the instructions on this tutorial: Ինչպե՞ս ցուցադրել / ցուցադրել մշակողի ներդիրը Excel ժապավենում:
  2. The cursor will turn into a cross, and then you need to drag the cursor to draw the text box at the location in the worksheet where you want to place the text box. After drawing the text box, release the mouse.
  3. Right click the text box and select Հատկություններ համատեքստի ընտրացանկից:
  4. Է Հատկություններ pane, link the text box to a cell by entering the cell reference in the LinkedCell- ը field. For example, typing "J2" ensures that any data entered in the text box automatically updates in cell J2, and vice versa.
  5. Սեղմեք է Դիզայնի ռեժիմ տակ Երեվակիչ tab to exit the Design Mode.

The text box now allows you to enter text.

Step 2: Apply the FILTER function
  1. Before using the FILTER function, copy the original header row to a new area. Here I place the header row under the search box.
    Ակնարկ: This approach allows users to clearly see the results under the same column headings as the original data.
  2. Select the cell under the first header (e.g. I5 in this example), enter the following formula into it and press the Մտնել արդյունքը ստանալու բանալին:
    =FILTER(Sheet2!$A$5:$G$281,Sheet2!$B$5:$B$281=J2,"No data found")
    As shown in the above screenshot, since the text box now has no input, the formula displays the result "Տվյալներ չեն գտնվել» I5.
Notes:
  • Այս բանաձեւում.
    • Sheet2!$A$5:$G$281: $A$5:$G$281is the data range that you want to filter on Sheet2.
    • Sheet2!$B$5:$B$281=J2: This part defines the criteria used to filter the range. It checks each cell in column B, from row 5 to 281 on Sheet2 to see if it equals the value in cell J2. J2 is the cell linked to the search box.
    • Տվյալներ չեն գտնվել: If the FILTER function does not find any rows where the value in column B equals the value in cell J2, it will return "No data found".
  • Այս մեթոդը գործը անզգայուն, meaning it will match text regardless of whether you type in uppercase or lowercase letters.
Result: Test the search box

Let's now test the search box. In this example, when I enter a customer's name in the search box, the corresponding results will be filtered and displayed immediately.


Create a search box using Conditional Formatting

Conditional Formatting can be used to highlight data that matches a search term, indirectly creating a search box effect. This method does not filter out data but visually guides you to the relevant cells. This section will show you how to create a search box using Conditional Formatting in Excel.

Step 1: Insert a text box and configure properties
Ակնարկ: If you only need to type in a cell to search for content and don’t require a prominent search box, you can skip this step and proceed directly to Քայլ 2.
  1. Կարդացեք Երեվակիչ էջանշանը, սեղմեք Տեղադրել > Տext Box (ActiveX Control).
    Ակնարկ: Եթե Երեվակիչ tab is not shown on the ribbon, you can enable it by following the instructions on this tutorial: Ինչպե՞ս ցուցադրել / ցուցադրել մշակողի ներդիրը Excel ժապավենում:
  2. The cursor will turn into a cross, and then you need to drag the cursor to draw the text box at the location in the worksheet where you want to place the text box. After drawing the text box, release the mouse.
  3. Right click the text box and select Հատկություններ համատեքստի ընտրացանկից:
  4. Է Հատկություններ pane, link the text box to a cell by entering the cell reference in the LinkedCell- ը field. For example, typing "J3" ensures that any data entered in the text box automatically updates in cell J3, and vice versa.
  5. Սեղմեք է Դիզայնի ռեժիմ տակ Երեվակիչ tab to exit the Design Mode.

The text box now allows you to enter text.

Step 2: Apply the Conditional Formatting for searching data
  1. Select the entire data range to be searched. Here I select the range A3:G279.
  2. Տակ է Գլխավոր էջանշանը, սեղմեք Պայմանական ֆորմատավորում > Նոր կանոն.
  3. Է Ձևաչափման նոր կանոն երկխոսության տուփ:
    1. ընտրել Օգտագործեք բանաձև `որոշելու համար, թե որ բջիջները ձևափոխել է Ընտրեք կանոնի տեսակը տարբերակները.
    2. Enter the following formula into the Ձևաչափեք արժեքները, երբ այս բանաձեւը ճիշտ է տուփ:
      =$B3=$J$3
      Այստեղ, $ B3 represents the first cell in the column you want to match with the search criteria in the selected range, and $ J $ 3 is the cell linked to the search box.
    3. Սեղմեք է Ֆորմատ button to specify a fill color for the search results.
    4. Սեղմեք է OK կոճակ Տեսեք,
Արդյունք

Let’s now test the search box. In this example, when I enter a customer’s name into the search box, the corresponding rows that contain this customer in column B will be immediately highlighted with the specified fill color.

Նշում: Այս մեթոդը գործը անզգայուն, meaning it will match text regardless of whether you type in uppercase or lowercase letters.

Create a search box with formula combinations

If you are not using the latest version of Excel and prefer not to only highlight rows, the method described in this section may be helpful. You can use a combination of Excel formulas to create a functional search box in any version of Excel. Please follow the steps below.

Step 1: Create a list of unique values from the search column
Ակնարկ: The unique values in the new range are the criteria I will use in the final search box.
  1. In this case, I select and copy the range B4: B281 to a new worksheet.
  2. After pasting the range in a new worksheet, keep the pasted data selected, go to the Ամսաթիվ ներդիր եւ ընտրեք Հեռացնել կրկնօրինակները.
  3. Բացման մեջ Հեռացնել կրկնօրինակները երկխոսության տուփ, կտտացրեք OK կոճակը:
  4. A Microsoft Excel- ը prompt box then pops up to show how many duplicates are removed. Click OK.
  5. After removing duplicates, select all the unique values in the list, excluding the header, and assign a name to this range by entering it in the Անուն box. Here I named the range as Հաճախորդ.
Step 2: Insert a combo box and configure properties
Ակնարկ: If you only need to type in a cell to search for content and don't require a prominent search box, you can skip this step and proceed directly to Քայլ 3.
  1. Go back to the worksheet containing the data set you want to search. Go to the Երեվակիչ էջանշանը, սեղմեք Տեղադրել > Combo Box (ActiveX հսկողություն).
    Ակնարկ: Եթե Երեվակիչ tab is not shown on the ribbon, you can enable it by following the instructions on this tutorial: Ինչպե՞ս ցուցադրել / ցուցադրել մշակողի ներդիրը Excel ժապավենում:
  2. The cursor will turn into a cross, and then you need to drag the cursor to draw the combo box at the location in the worksheet where you want to place the search box. After drawing the combo box, release the mouse.
  3. Right click the combo box and select Հատկություններ համատեքստի ընտրացանկից:
  4. Է Հատկություններ պատուհան:
    1. Link the combo box to a cell by entering the cell reference in the LinkedCell- ը field. Her I type "M2".
      Tip: Specify this field ensures that any data entered in the combo box will automatically update in cell M2, and vice versa.
    2. Է ListFillRange դաշտ, մուտքագրեք range name you specified for the unique list in Step 1.
    3. Փոխեք MatchEntry դաշտը 2 – fmMatchEntryNone.
    4. Փակեք Հատկություններ հաց.
  5. Սեղմեք է Դիզայնի ռեժիմ տակ Երեվակիչ tab to exit the Design Mode.

You can now select any item from the combo box or type in the text to search for.

Step 3: Apply formulas
  1. Create three helper columns adjacent to the original data range. See screenshot:
  2. In the cell (H5) under heading of the first helper column, enter the following formula and press Մտնել.
    =ROWS($B$5:B5)
    Այստեղ B5 is the cell containing the first custmer's name of the column to be searched.
  3. Double click the lower right corner of the formula cell, the following cell will automatically fill in the same formula.
  4. In the cell (I5) under the second helper column header, enter the following formula and press Մտնել. And then double click the lower right corner of the formula cell to automatically fill the cells below with the same formula.
    =IF(ISNUMBER(SEARCH($M$2,B5)),H5,"")
    Այստեղ M2 բջիջն է, որը կապված է համակցված տուփի հետ:
  5. In the cell (J5) under the third helper column header, enter the following formula and press Մտնել. And then double click the lower right corner of the formula cell to automatically fill the cells below with the same formula.
    =IFERROR(SMALL($I$5:$I$281,H5),"") 
  6. Copy the original header row to a new area. Here I place the header row under the search box.
  7. Select the cell under the first header (e.g. L5 in this example), enter the following formula into it and press the Enter key.
    =IFERROR(INDEX($A$5:$G$281,$J5,COLUMNS($L$4:L4)),"")
    Այստեղ A5: G281 is the entire data range that you want to displayed in the result cell.
  8. Select this formula cell, drag the Լրացրեք բռնակ to the right and then down to apply the formula to the corresponding columns and rows.
    Notes:
    • Since there is no input in the search box, the results of the formula will show the raw data.
    • This method is case-insensitive, meaning it will match text regardless of whether you type in uppercase or lowercase letters.
Արդյունք

Let's now test the search box. In this example, when I enter or select a customer's name from the combo box, the corresponding rows that contain that customer name in column B will be filtered and immediately displayed in the result range.


Creating a search box in Excel can significantly improve how you interact with your data, making your spreadsheets more dynamic and user-friendly. Whether you choose the simplicity of the FILTER function, the visual assistance of Conditional Formatting, or the versatility of formula combinations, each method provides valuable tools to enhance your data manipulation capabilities. Experiment with these techniques to find which works best for your specific needs and data scenarios. For those eager to delve deeper into Excel's capabilities, our website boasts a wealth of tutorials. Բացահայտեք Excel-ի ավելի շատ խորհուրդներ և հնարքներ այստեղ.


Գրասենյակի արտադրողականության լավագույն գործիքները

🤖 Kutools AI օգնականՀեղափոխություն կատարել տվյալների վերլուծության հիման վրա՝ Խելացի կատարում   |  Ստեղծեք ծածկագիր  |  Ստեղծեք հատուկ բանաձևեր  |  Վերլուծել տվյալները և ստեղծել գծապատկերներ  |  Invoke Kutools-ի գործառույթները...
Հանրաճանաչ հատկություններ: Գտեք, ընդգծեք կամ նույնականացրեք կրկնօրինակները   |  Deleteնջել դատարկ շարքերը   |  Միավորել սյունակները կամ բջիջները՝ առանց տվյալների կորստի   |   Կլոր առանց բանաձևի ...
Super Փնտրել: Բազմաթիվ չափանիշների VLookup    Բազմակի արժեք VLookup  |   VLookup բազմաթիվ թերթերում   |   Fuzzy Փնտրել ....
Ընդլայնված բացվող ցուցակ: Արագ ստեղծեք բացվող ցուցակը   |  Կախված բացվող ցուցակ   |  Բազմակի ընտրություն Drop Down ցուցակ ....
Սյունակի կառավարիչ: Ավելացրեք որոշակի քանակությամբ սյունակներ  |  Տեղափոխել սյունակները  |  Փոխարկել թաքնված սյունակների տեսանելիության կարգավիճակը  |  Համեմատեք միջակայքերը և սյունակները ...
Առանձնահատկություններ: Ցանցի կենտրոնացում   |  Դիզայնի տեսք   |   Մեծ Formula Bar    Աշխատանքային գրքույկի և թերթիկների կառավարիչ   |  Ռեսուրսների գրադարան (Ավտոմատ տեքստ)   |  Ամսաթիվ ընտրող   |  Միավորել աշխատանքային թերթերը   |  Գաղտնագրել/գաղտնազերծել բջիջները    Ուղարկեք նամակներ ըստ ցանկի   |  Սուպեր զտիչ   |   Հատուկ զտիչ (զտել թավ/շեղ/շեղված...) ...
Լավագույն 15 գործիքների հավաքածու12 Տեքստ Գործիքներ (Ավելացրեք տեքստ, Հեռացնել նիշերը, ...)   |   50+ Աղյուսակ Տեսակներ (Գանտի աղյուսակը, ...)   |   40+ Գործնական Բանաձեւեր (Հաշվարկել տարիքը ՝ ելնելով ծննդյան տարեդարձից, ...)   |   19 միացում Գործիքներ (Տեղադրեք QR կոդ, Տեղադրեք նկար ուղուց, ...)   |   12 Փոխարկում Գործիքներ (Բառեր համարներ, Արտարժույթի փոխակերպումը, ...)   |   7 Միաձուլում և պառակտում Գործիքներ (Ընդլայնված կոմբինատ տողեր, Պառակտված բջիջներ, ...)   |   ... եւ ավելին

Լրացրեք ձեր Excel-ի հմտությունները Kutools-ի հետ Excel-ի համար և փորձեք արդյունավետությունը, ինչպես երբեք: Kutools-ը Excel-ի համար առաջարկում է ավելի քան 300 առաջադեմ առանձնահատկություններ՝ արտադրողականությունը բարձրացնելու և ժամանակ խնայելու համար:  Սեղմեք այստեղ՝ Ձեզ ամենաշատ անհրաժեշտ հատկանիշը ստանալու համար...

Նկարագրություն


Office Tab- ը Tabbed ինտերֆեյսը բերում է Office, և ձեր աշխատանքը շատ ավելի դյուրին դարձրեք

  • Միացնել ներդիրներով խմբագրումը և ընթերցումը Word, Excel, PowerPoint- ով, Հրատարակիչ, Access, Visio և Project:
  • Բացեք և ստեղծեք բազմաթիվ փաստաթղթեր նույն պատուհանի նոր ներդիրներում, այլ ոչ թե նոր պատուհաններում:
  • Բարձրացնում է ձեր արտադրողականությունը 50%-ով և նվազեցնում մկնիկի հարյուրավոր սեղմումները ձեզ համար ամեն օր:
Comments (29)
No ratings yet. Be the first to rate!
This comment was minimized by the moderator on the site
me pueden apoyar en cual es la formula para solo buscar
porfa
This comment was minimized by the moderator on the site
Hi, for the second part: "Create Your Own Search Box With Formulas To List All Searched Results", it doesn't say what to do with the search box, my search box has no formula in it. I am trying to do it with multiple columns as well, does it work too?
This comment was minimized by the moderator on the site
Insert data from example. Copy formula in indicated cell, but delete space from formula. Easy!
This comment was minimized by the moderator on the site
i have tried using this but is dose not wont to highlight the box I am searching for why is this
This comment was minimized by the moderator on the site
Can you create a formula that captures two cells worth of information in retrospect i am using a set up that captures user names and badge data so i need it to when it filters that it carries both cells of information not just one
This comment was minimized by the moderator on the site
hi! I used the basic highlight search bar, but am having a couple of issues. it is predicting my search and finding it with no issues... however, it always highlights the cell a couple below or above the searched one. Are you able to help me with this please?
This comment was minimized by the moderator on the site
Hi! Is this applicable to Google Sheets? I'm trying to make a search box with formulas to list all searched results. I followed every steps listed above but the results shows nothing. There is an error tho, it says "change Iterative calculation". But whatever I do, it doesn't show anything - just blank. Can you help me with this, please... Thank you!
This comment was minimized by the moderator on the site
Good day,
This is only applicable to Microsoft Excel application. Sorry for the inconvenience.
This comment was minimized by the moderator on the site
Hi! Is this applicable to Google Sheets? I'm trying to make a search box with formulas to list all searched results. I followed every steps listed above but the results shows nothing. There is an error tho, it says "change Iterative calculation". But whatever I do, it doesn't show anything - just blank. Can you help me with this, please... Thank you!
This comment was minimized by the moderator on the site
Hello, I am using to search between my vendors (one column) and brands (another column). With this setup, there are brands (like Microsoft) that can have more vendors (vendor A, vendor B, vendor C,...). I would like to search for the brand (microsoft) name and would like to see all possible vendors (A, B & C as well). But now the result is only the first vendor and that's all. How can I change/fix that?

Many thanks!
This comment was minimized by the moderator on the site
Hi Tomas,
Maybe you can rearrange your data and create a dynamic drop down list to solve the problem. You can browse the below article for more details.
https://www.extendoffice.com/documents/excel/1350-excel-create-dynamic-drop-down-list.html
This comment was minimized by the moderator on the site
i followed the resulted search method and it worked perfectly however the results are hyperlinked and it shows me the result without the hyperlink is there a way i can make it show me the result with the link connection?
This comment was minimized by the moderator on the site
After entering the formula =ISNUMBER(SEARCH($B$1,A4)) for conditional formatting, if the cell I used for the search function is blank, all the cells that are searched (A4:C368) are highlighted. But once a string is entered for the search criteria the cells containing the search criteria are highlighted correctly. Is there a way to tweak the formula to not highlight until search criteria is entered? Or did I do something wrong?

Also, using the formula in step 5 on another sheet within the workbook isn't working. What I'm trying to do is perform a search and show results of that search on one sheet named Search & Results while having the information to be searched on a sheet named Index. The formula I'm using is =IFERROR(VLOOKUP(A3,Index!$A$4:$C$368,5,FALSE),"") where A3 is the beginning of my numbered cells on the Search & Results sheet and the search is taking place throughout cells A4:C368 on the Index sheet.
This comment was minimized by the moderator on the site
same had been having the same issue with the formula,try this in your conditional formatting rule "=AND($I$1<>"",ISNUMBER(SEARCH($I$1,$B4)))", it works for me
I1 is my search box, B4 is first cell of selected range
This comment was minimized by the moderator on the site
Hi Colby. Your vlookup formula=IFERROR(VLOOKUP(A3,Index!$A$4:$C$368,5,FALSE),"") refers to range from A4 to C368 in Sheet name index which have only 3 column but you are entering 5 right after $C$368 which tells the vlookup formula to display value of column 5 which does not exists in your selected range. Fix this and I believe that your problem will be solved.
This comment was minimized by the moderator on the site
I have the same problem. Did you get an answer?
This comment was minimized by the moderator on the site
also me. i have the same problem
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