search
HomeTopicsexcelPractical Excel skills sharing: making efficient search-style drop-down menus

In the previous article "Sharing practical Excel skills: Making dynamic Gantt charts", we learned how to make dynamic Gantt charts in Excel. Today we are going to talk about Excel data drop-down menus and introduce how to make efficient search-style drop-down menus. Come and take a look!

Practical Excel skills sharing: making efficient search-style drop-down menus

# At work, we often use Excel data validation to create drop-down menus to standardize data input and save data entry time. But when there are many data options in the drop-down menu, it will be difficult to find the data. For example, in the picture below, there are too many data options in the drop-down menu. It is time-consuming to "find" the required data items by dragging the scroll bar next to it, which directly reduces our work efficiency.

Practical Excel skills sharing: making efficient search-style drop-down menus

#So is there any way to solve this problem of too many options and hard to find data?

Yes, my method is the search drop-down menu!

Just like searching on Baidu, after entering the keyword, a drop-down menu will pop up to display search questions containing the keyword for selection. The effect we want to achieve is to enter keywords in the cell, and then click the drop-down menu. Only the data containing the keywords will be displayed in the menu, thereby improving data entry efficiency.

Practical Excel skills sharing: making efficient search-style drop-down menus

The picture below is the data source for our tutorial. Note that the data source must be sorted by keyword, either in ascending or descending order.

Practical Excel skills sharing: making efficient search-style drop-down menus

Select the cell range E2:E6, click the [Data] tab, click [Data Verification], and select "Settings" in the pop-up "Data Verification" dialog box. Set the verification condition in the card to "sequence".

Practical Excel skills sharing: making efficient search-style drop-down menus

Enter the formula in the source:

=OFFSET($A$1,MATCH(E2&"*",$A$2:$A $17,0),0,COUNTIF($A$2:$A$17,E2&"*"),1)

Practical Excel skills sharing: making efficient search-style drop-down menus

##Formula description:

Here we mainly use the OFFSET function to return data containing keywords. The function of the OFFSET function is to return new reference data through the given offset based on the specified reference cell.

OFFSET (reference frame, row offset, column offset, number of rows in the new reference area, number of columns in the new reference area)

  • 1. The first parameter refers to cell A1 as the reference system.

  • 2. The second parameter uses MATCH(E2&"*",$A$2:$A$17,0) to determine the row offset. MATCH is a search function. It searches in the area $A$2:$A$17 based on the search value E2&"*" (* is a wildcard character, representing any uncertain character). The search mode is 0 (exact search). When a keyword is entered in cell E2, this function will find the first occurrence of the data containing the keyword in the $A$2:$A$17 range.

  • 3. The third parameter is 0, because our data source only has one column, column A, so the column offset is 0, which means no offset. To put it simply, the offset function takes cell A1 as a reference and does not offset horizontally, but only offsets downward.

  • 4. The fourth parameter COUNTIF($A$2:$A$17,E2&"*") counts the conditions E2&"*" in the A2-A17 area, which means it contains the E2 unit The number of times the keywords in the cell appear, that is, how many rows will appear in the data validation drop-down menu.

  • 5. The fifth parameter is the number of columns in the new reference area. Since there is only column A, it is 1.

As shown below: The offset function searches downward using A1 as the reference system, and uses the match function to find the first occurrence of data containing the E2 keyword "broken flowers" in A2-A17 The position is the 10th row starting from A2, and then use the countif function to find a total of 3 rows, and finally return the data of these 3 rows and 1 column in the drop-down menu.

Practical Excel skills sharing: making efficient search-style drop-down menus

Return to the tutorial. We enter the formula in the "Source" of the "Data Validation" dialog box and click "OK". But when we enter the keyword "broken flowers" in cell E2, a warning box will pop up immediately. Why is this?

Practical Excel skills sharing: making efficient search-style drop-down menus

The reason is that after we enter the keyword "broken flower", the drop-down menu obtained by the formula does not have an option containing only the word "broken flower", so an error will be reported .

As shown in the figure below, we need to select the cell range E2:E6 again and click the [Data] tab [Data Verification] button to enter the "Data Verification" dialog box and uncheck the "Error Warning" tab. [Show error warning when entering invalid data] option, and then click "OK".

Practical Excel skills sharing: making efficient search-style drop-down menus

Finally enter the formula =IFERROR(VLOOKUP(E2,$A$2:$B$17,2,0),"") in cell F2. Use the VLOOKUP function to find the location of the E2 value in the cell range A2-B17, and return the corresponding inventory in column 2 (that is, column B). 0 represents an accurate search. When an error value cannot be found and an error value is returned, use the IFERROR function to convert the error value to null.

Practical Excel skills sharing: making efficient search-style drop-down menus

At this point, the search drop-down menu is completed!

Search-style drop-down menus can exponentially improve data entry efficiency, especially when there are many drop-down menu options. Classmate, quickly open your excel and do some operations.

Practical Excel skills sharing: making efficient search-style drop-down menus

Related learning recommendations: excel tutorial

The above is the detailed content of Practical Excel skills sharing: making efficient search-style drop-down menus. For more information, please follow other related articles on the PHP Chinese website!

Statement
This article is reproduced at:部落窝教育. If there is any infringement, please contact admin@php.cn delete
MEDIAN formula in Excel - practical examplesMEDIAN formula in Excel - practical examplesApr 11, 2025 pm 12:08 PM

This tutorial explains how to calculate the median of numerical data in Excel using the MEDIAN function. The median, a key measure of central tendency, identifies the middle value in a dataset, offering a more robust representation of central tenden

Google Spreadsheet COUNTIF function with formula examplesGoogle Spreadsheet COUNTIF function with formula examplesApr 11, 2025 pm 12:03 PM

Master Google Sheets COUNTIF: A Comprehensive Guide This guide explores the versatile COUNTIF function in Google Sheets, demonstrating its applications beyond simple cell counting. We'll cover various scenarios, from exact and partial matches to han

Excel shared workbook: How to share Excel file for multiple usersExcel shared workbook: How to share Excel file for multiple usersApr 11, 2025 am 11:58 AM

This tutorial provides a comprehensive guide to sharing Excel workbooks, covering various methods, access control, and conflict resolution. Modern Excel versions (2010, 2013, 2016, and later) simplify collaborative editing, eliminating the need to m

How to convert Excel to JPG - save .xls or .xlsx as image fileHow to convert Excel to JPG - save .xls or .xlsx as image fileApr 11, 2025 am 11:31 AM

This tutorial explores various methods for converting .xls files to .jpg images, encompassing both built-in Windows tools and free online converters. Need to create a presentation, share spreadsheet data securely, or design a document? Converting yo

Excel names and named ranges: how to define and use in formulasExcel names and named ranges: how to define and use in formulasApr 11, 2025 am 11:13 AM

This tutorial clarifies the function of Excel names and demonstrates how to define names for cells, ranges, constants, or formulas. It also covers editing, filtering, and deleting defined names. Excel names, while incredibly useful, are often overlo

Standard deviation Excel: functions and formula examplesStandard deviation Excel: functions and formula examplesApr 11, 2025 am 11:01 AM

This tutorial clarifies the distinction between standard deviation and standard error of the mean, guiding you on the optimal Excel functions for standard deviation calculations. In descriptive statistics, the mean and standard deviation are intrinsi

Square root in Excel: SQRT function and other waysSquare root in Excel: SQRT function and other waysApr 11, 2025 am 10:34 AM

This Excel tutorial demonstrates how to calculate square roots and nth roots. Finding the square root is a common mathematical operation, and Excel offers several methods. Methods for Calculating Square Roots in Excel: Using the SQRT Function: The

Google Sheets basics: Learn how to work with Google SpreadsheetsGoogle Sheets basics: Learn how to work with Google SpreadsheetsApr 11, 2025 am 10:23 AM

Unlock the Power of Google Sheets: A Beginner's Guide This tutorial introduces the fundamentals of Google Sheets, a powerful and versatile alternative to MS Excel. Learn how to effortlessly manage spreadsheets, leverage key features, and collaborate

See all articles

Hot AI Tools

Undresser.AI Undress

Undresser.AI Undress

AI-powered app for creating realistic nude photos

AI Clothes Remover

AI Clothes Remover

Online AI tool for removing clothes from photos.

Undress AI Tool

Undress AI Tool

Undress images for free

Clothoff.io

Clothoff.io

AI clothes remover

Video Face Swap

Video Face Swap

Swap faces in any video effortlessly with our completely free AI face swap tool!

Hot Tools

Atom editor mac version download

Atom editor mac version download

The most popular open source editor

SublimeText3 Linux new version

SublimeText3 Linux new version

SublimeText3 Linux latest version

mPDF

mPDF

mPDF is a PHP library that can generate PDF files from UTF-8 encoded HTML. The original author, Ian Back, wrote mPDF to output PDF files "on the fly" from his website and handle different languages. It is slower than original scripts like HTML2FPDF and produces larger files when using Unicode fonts, but supports CSS styles etc. and has a lot of enhancements. Supports almost all languages, including RTL (Arabic and Hebrew) and CJK (Chinese, Japanese and Korean). Supports nested block-level elements (such as P, DIV),

Zend Studio 13.0.1

Zend Studio 13.0.1

Powerful PHP integrated development environment

SecLists

SecLists

SecLists is the ultimate security tester's companion. It is a collection of various types of lists that are frequently used during security assessments, all in one place. SecLists helps make security testing more efficient and productive by conveniently providing all the lists a security tester might need. List types include usernames, passwords, URLs, fuzzing payloads, sensitive data patterns, web shells, and more. The tester can simply pull this repository onto a new test machine and he will have access to every type of list he needs.