search
HomeTopicsexcelPractical Excel skills sharing: How to create two-level and three-level drop-down menus

When it comes to making drop-down menus, we all know that it can be achieved by directly using data verification in Excel, but second-level, third-level, or even higher-level drop-down menus may be a bit confusing. In fact, it is not difficult at all to use Excel to create a three-level drop-down menu. It is as simple as copying and pasting! Do not believe? Let’s read the article together and you will know!

Practical Excel skills sharing: How to create two-level and three-level drop-down menus

Using data validation to create drop-down menus is familiar to most friends, but when it comes to second-level and third-level drop-down menus, you may not So familiar.

What are the second-level and third-level drop-down menus? For example, after selecting a province in a cell, only the city to which the province belongs can appear in the second cell option, and only the district to which the city belongs can appear in the third cell option. The effect is as shown in the figure.

Practical Excel skills sharing: How to create two-level and three-level drop-down menus

It looks amazing. In fact, it is very easy to make such a multi-level drop-down menu. You only need to master two skills: defining names and data validation (data validity). ) can be achieved. Let’s take a look at the specific steps.

1. Create a first-level drop-down menu

Operation points:

[Quickly define name]Select the province where the name is located In the cell range "A1:D1", enter "Province" in the name box and press Enter to confirm;

[Set data verification] Select the cell where you want to set the first-level drop-down menu, open data verification, and set the sequence. Enter "=province" as the source, and a drop-down menu will be generated after confirmation. The operation steps are as shown in the animation.

Practical Excel skills sharing: How to create two-level and three-level drop-down menus

Note: If "The specified named area does not exist" is prompted when setting data validation, it means that the definition of the name is incorrect.

Practical Excel skills sharing: How to create two-level and three-level drop-down menus

# Check whether the name is successfully defined by clicking "Formula-Name Manager".

Practical Excel skills sharing: How to create two-level and three-level drop-down menus

After the above operations, the setting of the first-level drop-down menu is completed.

2. Create a secondary drop-down menu

Operation points:

[Batch definition name] Select the province and affiliation The cell range where the city is located, that is, "A1:D6", in the "Formulas" tab "Defined Name", click "Create from selected content" to batch define names, and only check the "First row" when creating ";

After completion, you can check it through the name manager. At this time, there will be several more names corresponding to the provinces.

[Set data verification] Select the cell where you want to set the secondary drop-down menu, turn on the data verification, set the "sequence", enter "=INDIRECT(A14)" as the source, and after confirmation, the drop-down menu can be generated, and the operation The steps are shown in the animation.

Practical Excel skills sharing: How to create two-level and three-level drop-down menus

In order to make it easier to set up the third-level menu later, we use a relative reference for A14 here.

Attention should be paid to this step: A14 in the formula needs to be modified according to the actual situation. The meaning of this formula is to use the cell data generated by the first-level menu as the basis for the effectiveness of the second-level menu.

After the above operations, the setting of the secondary drop-down menu is completed. You can verify the correctness of the options yourself.

About the INDIRECT function:

This function is a reference function. Simply speaking, it is quoted according to the specified address. In this example, A14 is a province name, and there is a set of corresponding cities in the name manager, as shown in the figure:

Practical Excel skills sharing: How to create two-level and three-level drop-down menus

In this example, the function of the INDIRECT function is to get a set of names based on existing names. Corresponding data, if you need detailed tutorials on this function, you can leave a message to tell us.

3. Create a three-level drop-down menu

Operation points:

[Batch definition name ]Same as the previous step, select the cell range containing the city and district, that is, "F1:K17". Use the "Create from selected content" function to batch define names, and be careful to only check the "leftmost column" when creating;

[Copy Validity Settings] Copy the cell where the secondary drop-down menu is located, and when needed In the cell where the three-level drop-down menu is set, selectively paste "Verification" to complete the setting. The operation steps are as shown in the animation.

Practical Excel skills sharing: How to create two-level and three-level drop-down menus

Because a relative reference is used in the validity formula of the cell where the secondary menu is located, just copy and paste cell B14 directly.

If you want to set the validity, the source should enter "=INDIRECT(B14)".

How about it, setting up the third-level menu is not that difficult.

Summary:

What I’m sharing today is just the most basic multi-level menu setting method. You need to pay attention to a few things.

1. When setting up a multi-level menu, the structure of the drop-down data source is very important. In this example, you can see the characteristics of the data source setting. As for whether the title should be in the first row or the leftmost column, it can be determined according to actual needs. Certainly.

2. The advantage of this setting method is that it is easy to master and easy to expand. According to the same method, it is not difficult to set up a fourth-level menu or even a fifth-level menu. But the disadvantages are also obvious. For example, when the number of options is different, blank options will appear in the drop-down box, and when the option content is increased, the name range needs to be modified, which is not very smart.

Practical Excel skills sharing: How to create two-level and three-level drop-down menus

3. The core of setting up a multi-level menu is the usage of the INDIRECT function. If you want to make the drop-down menu more intelligent, do not contain blank items and automatically adjust when the content increases, You need to combine functions such as OFFSET, MATCH and COUNTA to achieve this. This requires considerable ability to use formula functions. If you are interested, please leave a message and tell the editor, and I will write another tutorial on this issue in the future.

Related learning recommendations: excel tutorial

The above is the detailed content of Practical Excel skills sharing: How to create two-level and three-level 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
一文教会你Excel折叠表格分类汇总功能一文教会你Excel折叠表格分类汇总功能May 12, 2022 am 11:58 AM

本篇文章给大家带来了关于excel的相关知识,其中主要介绍了关于折叠表格的相关问题,就是分类汇总的功能,这样查看数据会非常的方便,下面一起来看一下,希望对大家有帮助。

实例总结Excel中AGGREGATE函数的八个用法实例总结Excel中AGGREGATE函数的八个用法May 17, 2022 am 11:37 AM

本篇文章给大家带来了关于excel的相关知识,其中主要介绍了关于AGGREGATE函数的相关内容,该函数用法与SUBTOTAL函数类似,但在功能上比SUBTOTAL函数更加强大,下面一起来看一下,希望对大家有帮助。

实用Excel技巧分享:计算年数差、月数差、周数差实用Excel技巧分享:计算年数差、月数差、周数差Apr 22, 2022 am 09:56 AM

在之前的文章《实用Excel技巧分享:利用 数据透视表 来汇总业绩》中,我们学习了下Excel数据透视表,了解了利用数据透视表来汇总业绩的方法。而今天我们来聊聊怎么计算时间差(年数差、月数差、周数差),希望对大家有所帮助!

Word与Excel联动:表格借用Word进行分栏打印!Word与Excel联动:表格借用Word进行分栏打印!May 07, 2022 am 10:28 AM

在之前的文章《实用Word技巧分享:聊聊你没用过的“行号”功能》中,我们了解了Word中你肯定没用过的"行号”功能。今天继续实用Word技巧分享,看看Excel表格怎么借用Word进行分栏打印,快来收藏使用吧!

实用Excel技巧分享:合并单元格后实现筛选功能实用Excel技巧分享:合并单元格后实现筛选功能May 11, 2022 am 10:22 AM

在之前的文章《实用Excel技巧分享:原来“定位功能”这么有用!》中,我们了解了定位功能的妙用。而今天我们聊聊合并后的单元格如何实现筛选功能,分享一种复制粘贴和方法解决这个问题,另外还会给大家分享一种合并单元格的不错的替代方式。

实例详解利用Excel制作倒计时牌实例详解利用Excel制作倒计时牌May 16, 2022 am 11:53 AM

本篇文章给大家带来了关于excel的相关知识,其中主要介绍了关于zenmm制作倒计时牌的相关内容,使用Excel中的日期函数结合按指定时间刷新的VBA代码,即可制作出倒计时牌,下面一起来看一下,希望对大家有帮助。

Excel怎么查找总和为某个值的组合Excel怎么查找总和为某个值的组合May 18, 2022 am 11:25 AM

本篇文章给大家带来了关于excel的相关知识,其中主要介绍了关于如何使用函数寻找总和为某个值的组合的问题,下面一起来看一下,希望对大家有帮助。

图文详解Excel的折线图图文详解Excel的折线图May 07, 2022 am 11:28 AM

本篇文章给大家带来了关于excel的相关知识,其中主要介绍了关于折线图的相关问题,下面就根据一些示例来看一下怎么去应用,希望对大家有帮助。

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

AI Hentai Generator

AI Hentai Generator

Generate AI Hentai for free.

Hot Article

Hot Tools

SublimeText3 Chinese version

SublimeText3 Chinese version

Chinese version, very easy to use

Dreamweaver Mac version

Dreamweaver Mac version

Visual web development tools

WebStorm Mac version

WebStorm Mac version

Useful JavaScript development tools

Notepad++7.3.1

Notepad++7.3.1

Easy-to-use and free code editor

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.