Tip: Other languages are Google-Translated. You can visit the English version of this link.
Log in
x
or
x
x
Register
x

or

How to create your own search box in Excel?

Except using the Find function in Excel, actually you can create your own search box for searching needed values easily. This article will show you two methods to create your own search box in Excel in details.

Create your own search box with Conditional Formatting to highlight all searched results

Create your own search box with formulas to list all searched results


Easily search (find and replace) texts in all open workbooks or certain worksheets

The Advanced Find and Replace function of Kutools for Excel can help you easily search or find and replace certain content in all open workbooks as well as multiple specified workbooks. Download the full feature 60-day free trail of Kutools for Excel now!

Kutools for Excel: with more than 200 handy Excel add-ins, free to try with no limitation in 60 days. Download the free trial Now!

Office Tab Enable Tabbed Editing and Browsing in Office, and Make Your Work Much Easier...
Kutools for Excel Solves Most of Your Problems, and Increases Your Productivity by 80%
  • Reuse Anything: Add the most used or complex formulas, charts and anything else to your favorites, and quickly reuse them in the future.
  • More than 20 text features: Extract Number from Text String; Extract or Remove Part of Texts; Convert Numbers and Currencies to English Words.
  • Merge Tools: Multiple Workbooks and Sheets into One; Merge Multiple Cells/Rows/Columns Without Losing Data; Merge Duplicate Rows and Sum.
  • Split Tools: Split Data into Multiple Sheets Based on Value; One Workbook to Multiple Excel, PDF or CSV Files; One Column to Multiple Columns.
  • Paste Skipping Hidden/Filtered Rows; Count And Sum by Background Color; Send Personalized Emails to Multiple Recipients in Bulk.
  • Super Filter: Create advanced filter schemes and apply to any sheets; Sort by week, day, frequency and more; Filter by bold, formulas, comment...
  • More than 300 powerful features; Works with Office 2007-2019 and 365; Supports all languages; Easy deploying in your enterprise or organization.

Create your own search box with Conditional Formatting to highlight all searched results


You can do as follows to create your own search box by using the Conditional Formatting function in Excel.

1. Select the range with data you need to search by the search box, then click Conditional Formatting > New Rule under the Home tab. See screenshot:

2. In the New Formatting Rule dialog box, you need to:

2.1) Select Use a formula to determine which cells to format option in the Select a Rule Type box;

2.2) Enter formula =ISNUMBER(SEARCH($B$2,A5)) into the Format values where this formula is true box;

2.3) Click the Format button to specify a highlighted color for the searched value;

2.4) Click the OK button.

Notes:

1. In the formula, $B$2 is a blank cell you need to use it as a search box, and A5 is the first cell of your selected range you need to search values within. Please change them as you need.

2. The formula is not case-sensitive.

Now the search box is created, when typing search criteria into the search box B2 and press the Enter key, all matched values in the specified range are searched out and highlighted immediately as below screenshot shown.


Create your own search box with formulas to list all searched results

Supposing you have a data list locating in range E4:E23 which you need to search, if you want to list all matched values in another column after searching with your own search box, you can try the below method.

1. Select a blank cell which is adjacent to cell E4, here I select cell D4, then enter formula =IFERROR(SEARCH($B$2,E4)+ROW()/100000,"") into the formula bar, and then press the Enter key. See screenshot:

Note: In the formula, $B$2 is the cell you need to use it as a search box, E4 is the first cell of the data list you need to search. You can change them as you need.

2. Keep selecting cell E4, then drag the Fill Handle down to cell D23. See screenshot:

3. Now select cell C4, enter formula =IFERROR(RANK(D4,$D$4:$D$23,1),"") into the Formula Bar, and press the Enter key. Select cell C4, then drag the Fill Handle down to C23. See screenshot:

4. Now you need to fill range A4:A23 with series number which increase by 1 from 1 to 20 as below screenshot:

5. Select a blank cell you need to display the searched result, enter formula =IFERROR(VLOOKUP(A4,$C$4:$E$23,3,FALSE),"") into the Formula Bar and press the Enter key. Keep selecting cell B4, drag the Fill Handle down to B23 as below screenshot shown.

From now on, when entering data in searching box B2, all matched values will be listed in range B4:B23 as below screenshot shown.

Note: this method is not case-sensitive.

Office Tab - Tabbed Browsing, Editing, and Managing of Workbooks in Excel:

Office Tab brings the tabbed interface as seen in web browsers such as Google Chrome, Internet Explorer new versions and Firefox to Microsoft Excel. It will be a time-saving tool and irreplaceble in your work. See below demo:

Click for free trial of Office Tab!

Office Tab for Excel


Kutools for Excel Solves Most of Your Problems, and Increases Your Productivity by 80%

  • Reuse: Quickly insert complex formulas, charts and anything that you have used before; Encrypt Cells with password; Create Mailing List and send emails...
  • Super Formula Bar (easily edit multiple lines of text and formula); Reading Layout (easily read and edit large numbers of cells); Paste to Filtered Range...
  • Merge Cells/Rows/Columns without losing Data; Split Cells Content; Combine Duplicate Rows/Columns... Prevent Duplicate Cells; Compare Ranges...
  • Select Duplicate or Unique Rows; Select Blank Rows (all cells are empty); Super Find and Fuzzy Find in Many Workbooks; Random Select...
  • Exact Copy Multiple Cells without changing formula reference; Auto Create References to Multiple Sheets; Insert Bullets, Check Boxes and more...
  • Extract Text, Add Text, Remove by Position, Remove Space; Create and Print Paging Subtotals; Convert Between Cells Content and Comments...
  • Super Filter (save and apply filter schemes to other sheets); Advanced Sort by month/week/day, frequency and more; Special Filter by bold, italic...
  • Combine Workbooks and WorkSheets; Merge Tables based on key columns; Split Data into Multiple Sheets; Batch Convert xls, xlsx and PDF...
  • More than 300 powerful features. Supports Office/Excel 2007-2019 and 365. Supports all languages. Easy deploying in your enterprise or organization. Full features 30-day free trial.
kte tab 201905

Office Tab Brings Tabbed interface to Office, and Make Your Work Much Easier

  • Enable tabbed editing and reading in Word, Excel, PowerPoint, Publisher, Access, Visio and Project.
  • Open and create multiple documents in new tabs of the same window, rather than in new windows.
  • Increases your productivity by 50%, and reduces hundreds of mouse clicks for you every day!
officetab bottom
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.
    Ellie Burns · 1 years ago
    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?
  • To post as a guest, your comment is unpublished.
    Colby · 1 years ago
    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.
    • To post as a guest, your comment is unpublished.
      Prashant Khalkho · 2 months ago
      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.
    • To post as a guest, your comment is unpublished.
      Don · 1 years ago
      I have the same problem. Did you get an answer?
      • To post as a guest, your comment is unpublished.
        LUCA · 2 months ago
        also me. i have the same problem
  • To post as a guest, your comment is unpublished.
    alicia · 1 years ago
    What if the data will continue to increase, new data is entered everyday? So I want the search to not only search the information in specific columns currently but all the new rows that will be added to those columns later.
    • To post as a guest, your comment is unpublished.
      crystal · 1 years ago
      Hi alicia.
      Sorry can't help with that. You need to manually update the formula references after new rows has been added to columns.
      Thanks for your comments.
      • To post as a guest, your comment is unpublished.
        doops · 6 months ago
        me too... Is there any help you can offer?
  • To post as a guest, your comment is unpublished.
    Carlos Solrac · 1 years ago
    how can I add worksheet as a another search area?
  • To post as a guest, your comment is unpublished.
    edd · 1 years ago
    how to add another worksheet as a area for data search
    • To post as a guest, your comment is unpublished.
      crystal · 1 years ago
      Good Day,
      For searching data in another worksheet (such as Sheet5), please change the formula in the conditional formatting method to =(SEARCH(Sheet5!$B$2,A5)).
      Sorry can't solve the problem with the above second method.
  • To post as a guest, your comment is unpublished.
    venkatesh · 2 years ago
    my data is used by office members.so i want to protect data loss by password.if i try to enable password search bar also not working .what can i do to safe gard data and made it searchable
    • To post as a guest, your comment is unpublished.
      crystal · 1 years ago
      Good Day,
      Please format the cell you need to specify as a search box as Unlocked before protecting the worksheet with password. Then your data is protected but searchable.
  • To post as a guest, your comment is unpublished.
    Srikanth · 2 years ago
    Thank you so much for your help. This is so easy and simple to create.