How to create a multi-level drop-down menu in excel? ?
You need to use VBA to monitor table content changes. The implementation method is as follows:
1. First enter two columns in the areas that will definitely not be used in sheet1, corresponding to "service attitude, business capabilities"
Name the area of "Voice and Intonation, Overtones, and Active Service Awareness" as "Service Attitude"
Name the "required conversion, query error" area as "Business Capability"
2. Then enter the following code on the sheet1 code page, which is used to monitor changes in A1 and adjust B1 settings based on the changes.
Private Sub Worksheet_Change(ByVal Target As Range)
If Target = Range("A1") Then
Range("B1").Validation.Delete
Range("B1").Validation.Add Type:=xlValidateList, AlertStyle:=xlValidAlertStop, Operator:= _
xlBetween, Formula1:="=" & Target.Text
End If
End Sub
How to set up a two-level drop-down menu in Excel
First look at the original data. The original information is in a worksheet. The first row is the name of the province and city. The following actions correspond to the place names and district names under the province and city. You need to create a linked secondary drop-down menu in columns A and B in another worksheet.
2
First, select all the data in the original table (including extra blank cells), and press F5 or Ctrl G to bring up the positioning dialog box. Select [Target Criteria] in the lower left corner.
3
As shown below, select [Constant] and click the [OK] button. In this way, all non-empty cells are selected.
4
Select [Data]-[Validity]-[Create based on selected content] in the ribbon.
5
Since the title is on the first line, select [First Line] as the name, and then click the [OK] button.
6
After the operation is completed, you can see the defined name in the name manager.
7
Select the name of the province and city in the first row (also locate the non-blank cell), enter the two words "province and city" in the name box, and then press Enter, thus defining a name of "province and city" .
8
Select cell A2 on the operation interface and select [Data]-[Data Validity].
9
As shown below, select [Sequence], enter [Source]: =Province and City, and then click the [OK] button.
10
In this way, a drop-down menu of province and city information is generated in cell A2.
11
In the same way, select cell B2, set data validity, and enter the formula: =INDIRECT($A$2).
12
After the setting is completed, when "Hebei" is selected in cell A2, the drop-down menu of B2 returns the information of "Hebei"; when "Beijing" is selected in cell A2, the drop-down menu of B2 returns the information of "Beijing".
13
Notice:
The formula for the above-mentioned secondary drop-down menu settings uses absolute references for both rows and columns. If you want to make the secondary drop-down menu available to the entire column, change the formula to: =INDIRECT($A2).
How to make multi-level linkage drop-down menu in Excel
Take WPS 2019 version as an example:
Regarding how to set up multi-level drop-down items in excel tables, the operation method in WPS "Table (Excel)" is as follows:
1. First, we enter the data into Sheet2 and Sheet3 respectively in the form. Sheet2 contains the first-level and second-level data, and Sheet3 contains the second-level and third-level data. Similar to the way we made the secondary drop-down menu before, we first enter Sheet2, select all the data, click "Formula-Specify-Only keep the check in front of "First Row", and cancel all others. In the same way, we enter Sheet3 again to operate;
2. Set up a first-level drop-down menu: Enter Sheet1, select cell A2, enter "Data-Validity-Validity-Select Sequence", and select the "A1:C1" cells in Sheet2 in "Source" ( It’s the content of the first-level drop-down menu);
(Note: After completing the setting, select an option first, otherwise an error will be prompted when setting the second level)
3. Set up a secondary drop-down menu. Position the cursor to cell B2, then enter "Data-Validity-Validity-Select Sequence" and "Source" to enter "=INDIRECT(A2)" to confirm;
4. Set up a three-level drop-down menu. Select cell C2 and perform the same operation, except that you enter "=INDIRECT(B2)" in "Source". Finally, we select cells A2:C2 and fill them downward. At this point, our multi-level drop-down menu is complete.
How to use Excel data validity to create a multi-level linkage drop-down list
Method/Step
Get to know the drop-down menu
As shown in the example below, the first-level drop-down menu is for provinces, the second-level is for cities, and the third-level is for counties or districts. The second-level drop-down menu needs to automatically select the corresponding city based on the selection on the first-level menu. Similarly, the third-level drop-down menu needs to automatically select the corresponding county or district based on the selection on the second-level menu.
Create a first-level drop-down menu
The first-level menu is province, that is, Guangdong and Guangxi, so you can directly use the reference of data validity.
Create a second-level drop-down menu
The second-level menu is city. The second-level menu needs to display the second-level menu content according to the selection of the first-level menu. For example, if Guangdong is selected at the first level, the menu that needs to be selected at the second level is "Guangzhou, Dongguan, Shenzhen...";
Creating a third-level drop-down menu
The third-level menu is county. The third-level menu needs to display the third-level menu content according to the selection of the second-level menu. For example, if Guangzhou is selected at the second level, the menu that needs to be selected at the third level is "Tianhe". district.....";
5
Remove spaces in data validation menu
When defining a name, you need to select the range in which the name is defined. If the range includes spaces, spaces will appear in the menu. The simplest way is to only select the range with data to define the name.
The above is the detailed content of How to create cascading menu in excel?. For more information, please follow other related articles on the PHP Chinese website!

This tutorial shows you how to quickly apply, modify, and remove Excel table styles while preserving all table functionalities. Want to make your Excel tables look exactly how you want? Read on! After creating an Excel table, the first step is usual

This tutorial shows you how to use Excel's Subtotal feature to efficiently summarize data within groups of cells. Learn how to sum, count, or average, display or hide details, copy only subtotals, and remove subtotals altogether. Large datasets can

This tutorial explains the Compound Annual Growth Rate (CAGR) and provides multiple ways to calculate it in Excel. CAGR measures the average annual growth of an investment over a specific period, offering a clearer picture than simple year-to-year g

The tutorial explains the specificities of the SUBTOTAL function in Excel and shows how to use Subtotal formulas to summarize data in visible cells. In the previous article, we discussed an automatic way to insert subtotals in Excel by us

This tutorial introduces the Excel IFS function, a streamlined alternative to nested IF statements. It simplifies creating formulas with multiple conditions and improves readability. Available in Excel 365, 2021, and 2019, IFS significantly reduces

Improve Excel efficiency: Make good use of named regions By default, Microsoft Excel cells are named after column-row coordinates, such as A1 or B2. However, you can assign more specific names to a cell or cell range, improving navigation, making formulas clearer, and ultimately saving time. Why always name regions in Excel? You may be familiar with bookmarks in Microsoft Word, which are invisible signposts for the specified locations in your document, and you can jump to where you want at any time. Microsoft Excel has a bit of a unimaginative alternative to this time-saving tool called "names" and is accessible via the name box in the upper left corner of the workbook. Related content #

This tutorial shows you how to create interactive Excel checklists, to-do lists, reports, and charts using checkboxes. Checkboxes, also known as tick boxes or selection boxes, are small squares you click to select or deselect options. Adding them to

This tutorial unveils the power of Excel's Advanced Filter, guiding you through its use in retrieving records based on complex criteria. Unlike the standard AutoFilter, which handles simpler filtering tasks, the Advanced Filter offers precise contro


Hot AI Tools

Undresser.AI Undress
AI-powered app for creating realistic nude photos

AI Clothes Remover
Online AI tool for removing clothes from photos.

Undress AI Tool
Undress images for free

Clothoff.io
AI clothes remover

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

Hot Article

Hot Tools

SublimeText3 Linux new version
SublimeText3 Linux latest version

Dreamweaver Mac version
Visual web development tools

ZendStudio 13.5.1 Mac
Powerful PHP integrated development environment

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.

SublimeText3 Mac version
God-level code editing software (SublimeText3)