跳到主要內容

如何在Excel中快速創建動態依賴下拉列表?

我們大多數人可能可以通過使用Excel中的數據驗證功能來創建下拉列表,但是有時我們需要鏈接的或動態的下拉列表,這意味著當您在下拉列表A中選擇一個值並且您想要下拉列表B中要更新的值。在Excel中,我們可以使用 數據驗證 功能和 間接 功能。 本教程將介紹如何在Excel中創建相關的下拉列表。


在 Excel 中創建動態依賴下拉列表

假設我有一個四列的表格,該表格指示四種食物:水果,食物,肉和飲料,並且在它們下面是特定的食物名稱。 請參見以下屏幕截圖:

現在,我需要創建一個包含食物的下拉列表,例如水果,食物,肉和飲料,第二個下拉列表將具有特定的食物名稱。 如果選擇食物,第二個下拉菜單將顯示大米,麵條,麵包和蛋糕。 為此,請執行以下步驟:

1。 首先,我需要為這些列和第一個類別行創建一些範圍名稱。

(1.)在類別的第一行中創建一個範圍名稱,選擇A1:D1,然後鍵入範圍名稱 食品名稱框,然後按 Enter 鍵。

(2.)然後,您需要按照上面的步驟命名每個列的範圍,如下所示:

尖端 -導航窗格:在Excel中的窗格中批量創建多個命名範圍並列出
通常,我們一次只能在Excel中定義一個名稱範圍。 但是在某些情況下,您可能需要創建多個命名範圍。 一次又一次地定義名稱必須非常繁瑣。 Kutools for Excel提供了一個實用程序,可以快速批量創建多個命名範圍,並在 導航窗格 以方便查看和訪問。


廣告導航窗格名稱

2。 現在,我可以創建第一個下拉列表,請選擇一個空白單元格或要應用此下拉列表的列,然後單擊 數據 > 數據驗證 > 數據驗證,請參見屏幕截圖:

3。 在 數據驗證 對話框,單擊 設定 標籤,選擇 名單 來自 下拉列表,然後輸入此公式 =食品資源 框。 看截圖:

備註:您需要在公式中輸入您命名的類別。

4. 點擊 OK 並且已經創建了我的第一個下拉列表,然後選擇單元格並將填充手柄拖到要應用此選項的單元格。

5。 然後,我可以創建第二個下拉列表,選擇一個空白單元格,然後單擊 數據 > 數據驗證 > 數據驗證 再次,在 數據驗證 對話框,單擊 設定 標籤,選擇 名單 來自 下拉列表,然後輸入此公式 =間接(F1)資源 框,請參見屏幕截圖:

備註: F1 表示我創建的第一個下拉列表的單元格位置,您可以根據需要進行更改。

6. 然後點擊 OK, 並向下拖動單元格內容,則已成功創建從屬下拉列表。 看截圖:

然後,如果我選擇一種食物,則相應的單元格將僅顯示其特定的食物名稱。

筆記:
1.僅當單元處於活動狀態時,下拉箭頭才可見。
2.您可以根據需要繼續深入,如果要創建第三個下拉列表,只需將第二個下拉列表用作 資源 第三個下拉菜單中的

演示:在Excel中創建動態下拉列表


Excel的Kutools:超過 300 個方便的工具觸手可及! 立即開始 30 天免費試用,沒有任何功能限制。 現在就下載!

使用一個神奇的工具快速創建依賴下拉列表

假設您在RangeB2:E8中有一個數據表,並且您想基於Range G2:H8中的數據表創建獨立的下拉列表。 現在,您可以輕鬆地完成 動態下拉列表 的特點 Excel的Kutools.

Excel的Kutools-包括300多個用於Excel的便捷工具。 全功能30天免費試用,無需信用卡! 立即行動吧!

1。 點擊 庫工具 > 下拉列表 > 動態下拉列表 啟用此功能。

2。 在彈出的對話框中,請執行以下操作:

(1)勾選 2級依賴下拉列表 選項;
(2)在“數據范圍”框中,選擇要創建獨立下拉列表的數據表;
(3)在“輸出範圍”框中,請選擇將放置獨立下拉列表的目標範圍。

3。 點擊 Ok 按鈕。

到目前為止,已經在指定的目標範圍內創建了獨立的下拉列表。 您可以輕鬆地從這些獨立的下拉列表中選擇選項。



相關文章:

最佳辦公生產力工具

🤖 Kutools 人工智慧助手:基於以下內容徹底改變數據分析: 智慧執行   |  生成代碼  |  建立自訂公式  |  分析數據並產生圖表  |  呼叫 Kutools 函數...
熱門特色: 尋找、突出顯示或識別重複項   |  刪除空白行   |  合併列或儲存格而不遺失數據   |   沒有公式的回合 ...
超級查詢: 多條件VLookup    多值VLookup  |   跨多個工作表的 VLookup   |   模糊查詢 ....
高級下拉列表: 快速建立下拉列表   |  依賴下拉列表   |  多選下拉列表 ....
欄目經理: 新增特定數量的列  |  移動列  |  切換隱藏列的可見性狀態  |  比較範圍和列 ...
特色功能: 網格焦點   |  設計圖   |   大方程式酒吧    工作簿和工作表管理器   |  資源庫 (自動文字)   |  日期選擇器   |  合併工作表   |  加密/解密單元格    按清單發送電子郵件   |  超級濾鏡   |   特殊過濾器 (過濾粗體/斜體/刪除線...)...
前 15 個工具集12 文本 工具 (添加文本, 刪除字符,...)   |   50+ 圖表 類型 (甘特圖,...)   |   40+ 實用 公式 (根據生日計算年齡,...)   |   19 插入 工具 (插入二維碼, 從路徑插入圖片,...)   |   12 轉化 工具 (數字到單詞, 貨幣兌換,...)   |   7 合併與拆分 工具 (高級合併行, 分裂細胞,...)   |   ... 和更多

使用 Kutools for Excel 增強您的 Excel 技能,體驗前所未有的效率。 Kutools for Excel 提供了 300 多種進階功能來提高生產力並節省時間。  點擊此處獲取您最需要的功能...

產品描述


Office選項卡為Office帶來了選項卡式界面,使您的工作更加輕鬆

  • 在Word,Excel,PowerPoint中啟用選項卡式編輯和閱讀,發布者,Access,Visio和Project。
  • 在同一窗口的新選項卡中而不是在新窗口中打開並創建多個文檔。
  • 將您的工作效率提高 50%,每天為您減少數百次鼠標點擊!
Comments (27)
No ratings yet. Be the first to rate!
This comment was minimized by the moderator on the site
Why the dependent list doesn't change instantly?
This comment was minimized by the moderator on the site
Hi Ferat,
Have you followed the tutorial to create your dynamic drop down list? If followed the tutorial, the dependent list will change immediately as the main choice (in Cell F1) changes.
More detailed information can help me understand your problem. If possible, upload some screenshots will be helpful!
This comment was minimized by the moderator on the site
So I tried this with dynamic ranges. It's a no go. It does work with static ranges though.
This comment was minimized by the moderator on the site
I understand but how can I repeat the dropdown formatting in all rows of excel
This comment was minimized by the moderator on the site
Have you received an answer to your question? I'm wondering the same thing..
This comment was minimized by the moderator on the site
Lara, you are probably missed the second half of ste p 4. 4. Click OK and my first drop down list have been created, then select the cell and drag the fill handle to the cell that you want to apply this option.
This comment was minimized by the moderator on the site
I keep getting an error that says " the source currently evaluates to an error", any reason why? I followed the steps above. Any guidance would be greatly appreciated.
This comment was minimized by the moderator on the site
Hi, I am looking to do something similar but the only problem being my dynamic parameter and value combination list is structured as below Parm_nm Val_list Parent1 Item01 Parent1 Item02 Parent2 Item01 Parent2 Item03 Parent2 Item11 Parent3 Item32 Parent3 Item02 Parent4 Item09 Parent4 Item01 And I want to choose appropriate drop down depending on the header definition Eg: If the header definition is Parent3 then the drop down for the cells under the column should have Item32 and Item02. If the header is changed to Parent02 then the drop down list becomes Item01, Item3 and Item11. It is exactly what is being done here apart from the fact the source data structure is completely different and I do not have freedom to restructure it. In such a scenario I am not being able to Name the range of the second level list as I cannot just select and name them. Any help in this regard will highly appreciated. Regards, Sattam
This comment was minimized by the moderator on the site
in case the second drop down has to pick a list that is Dynamic, then how will this work. As in if fruit food meat and drink is for month one and the names for month two changes to fruit2 meat2 food2 and drink2 along with the selection below this headings then how do we use thius formula.
This comment was minimized by the moderator on the site
Thank you it worked like a magic
This comment was minimized by the moderator on the site
When I create a drop-down list using data validation, how can I select the valid entries from the keyboard, I want to type the number and have it auto-populate. Data Validation List looks like this : 1_Ready 2_On Hold 3_ Rejected
This comment was minimized by the moderator on the site
Quite useful. Thank you.
There are no comments posted here yet
Load More
Please leave your comments in English
Posting as Guest
×
Rate this post:
0   Characters
Suggested Locations