Skip to content
Free Excel Tutorials
  • Home
  • Excel For Beginners
  • Excel Intermediate
  • Advanced Excel For Experts

Data Analysis

  • Move chart to a separate worksheet in Excel
  • Subtotal function in Excel
  • Managing Conditional Formatting Rules in Excel
  • Number and Text Filters Examples in Excel
  • How to Create Area Chart in Excel

References

  • How to get address of last cell in range in Excel
  • Extract data with helper column in Excel
  • How to get relative column numbers in a range in Excel
  • How to use Excel VLOOKUP Function
  • How to get address of first cell in range in Excel

Data Validations

  • Excel Data validation allow uppercase only
  • Excel Data validation whole percentage only
  • How To Create Drop-down List in Excel
  • Prevent invalid data entering in specific cells
  • Excel Data validation must begin with

How to create your own Search Box in Excel

by

This example teaches you how to create your own search box in Excel.

You Can Create Your Own Search Box With Formulas To List All Searched Results

This is what the spreadsheet looks like. If you enter a search query into cell B2, Excel searches through column E and the results appear in column B.


To create this search box, execute the following steps.

1. Select cell D4 and insert the SEARCH function shown below. Create an absolute reference to cell B2.

2. Double click the right corner of cell D4 to quickly copy the function to the other cells.

Explanation: the SEARCH function finds the position of a substring in a string. The SEARCH function is case-insensitive. For Tunisia, string “uni” is found at position 2. For United States, string “uni” is found at position 1. The lower the number, the higher it should be ranked.

Worked Example:   Common Errors in Excel

3. Both United States and United Kingdom return the value 1. To return unique values, which will help us when we use the RANK function in a moment, slightly adjust the formula in cell D4 as shown below.

4. Again, double click the right corner of cell D4 to quickly copy the formula to the other cells.

Explanation: the ROW function returns the row number of a cell. If we divide the row number by a large number and add it to the result of the SEARCH function, we always have unique values. However, these small increments won’t influence the search rankings. United States has a value of 1.00006 now and United Kingdom has a value of 1.00009. We also added the IFERROR function. If a cell contains an error (when a string cannot be found), an empty string (“”) is displayed.

Worked Example:   Basic error trapping example in Excel

5. Select cell C4 and insert the RANK function shown below.

6. Double click the right corner of cell C4 to quickly copy the formula to the other cells.

Explanation: the RANK function returns the rank of a number in a list of numbers. If the third argument is 1, Excel ranks the smallest number first, second smallest number second, etc. Because we added the ROW function, all values in column D are unique. As a result, the ranks in column C are unique too (no ties).

Worked Example:   Count cells that contain errors in Excel

7. We are almost there. We’ll use the VLOOKUP function to return the countries found (lowest rank first, second lowest rank second, etc.) Select cell B4 and insert the VLOOKUP function shown below.

8. Double click the right corner of cell B4 to quickly copy the formula to the other cells.

9. Change the text color of the numbers in column A to white and hide columns C and D.

Result. Your own search box in Excel.

Post navigation

Previous Post:

How to create a meal planner in Excel

Next Post:

How to Copy Visible Cells Only in Excel

Leave a Reply Cancel reply

Your email address will not be published. Required fields are marked *

Learn Basic Excel

Ribbon
Workbook
Worksheets
Format Cells
Find & Select
Sort & Filter
Templates
Print
Share
Protect
Keyboard Shortcuts

Categories

  • Charts
  • Data Analysis
  • Data Validation
  • Excel Functions
    • Cube Functions
    • Database Functions
    • Date and Time Functions
    • Engineering Functions
    • Financial Functions
    • Information Functions
    • Logical Functions
    • Lookup and Reference Functions
    • Math and Trig Functions
    • Statistical Functions
    • Text Functions
    • Web Functions
  • Excel VBA
  • Excel Video Tutorials
  • Formatting
  • Grouping
  • Others

Logical Functions

  • XOR function: Description, Usage, Syntax, Examples and Explanation
  • IFNA function: Description, Usage, Syntax, Examples and Explanation
  • OR function: Description, Usage, Syntax, Examples and Explanation
  • How to use Excel AND Function
  • IFERROR function: Description, Usage, Syntax, Examples and Explanation

Date Time

  • How to get year from date in Excel
  • Display Date is workday in Excel
  • How to calculate workdays per month in Excel
  • Display Days in month in Excel
  • Add months to date in Excel

Grouping

  • How to randomly assign people to groups in Excel
  • Group times into unequal buckets in Excel
  • How to randomly assign data to groups in Excel
  • Group arbitrary text values in Excel
  • Map text to numbers in Excel

General

  • How to calculate percent of goal in Excel
  • Share Excel data with Word documents
  • How to create dynamic named range with INDEX in Excel
  • Sum by group in Excel
  • 3D SUMIF for multiple worksheets in Excel
© 2023 xlsoffice . All Right Reserved. | Teal Smiles | Abbreviations And Their Meaning