跳到主要內容

如何在另一個工作表或工作簿中創建外部數據驗證?

通常,我們使用數據驗證來限制用戶輸入所需的值,但是您是否曾經嘗試過在其他工作表或工作簿中創建外部數據驗證,這意味著源數據和數據驗證不在同一工作表中或甚至是同一本工作簿? 在本文中,我將介紹在Excel中處理此問題的方法。

在另一個工作表中創建外部數據驗證

在其他工作簿中創建外部數據驗證


箭頭藍色右氣泡 在另一個工作表中創建外部數據驗證

以創建下拉列表為例,我將在一個工作表中創建源,然後使用Range Name根據值源在另一工作表中創建下拉列表。

1.根據需要在工作表中創建下拉列表的源值。 看截圖:
doc外部數據驗證1

2.選擇這些源值,然後轉到 名稱框 為單元格定義一個範圍名稱,在這裡我輸入 國家 ,在 名稱框,然後按 Enter 完成命名的關鍵。 看截圖:
doc外部數據驗證2

3.轉到要創建此外部下拉列表的工作表,然後選擇一個單元格或範圍以放置下拉列表,例如G1:G4,然後單擊 數據 > 數據驗證。 看截圖:
doc外部數據驗證3

4。 在裡面 數據驗證 對話框中單擊 設定 選項卡,然後選擇 名單 來自 下拉列表,然後輸入 =國家 (國家/地區是您在第2步中為來源範圍定義的名稱,您可以根據需要更改)。 資源。 看截圖:
doc外部數據驗證4

5。 點擊 OK,現在已經創建了外部數據驗證。
doc外部數據驗證5


箭頭藍色右氣泡 在其他工作簿中創建外部數據驗證

若要在另一個工作簿中創建外部數據驗證,您還需要使用“名稱範圍”。

以創建下拉列表為例。

1.在工作表中根據需要創建源值,然後選擇源值,然後轉到 名稱框 為來源範圍命名,然後按 Enter 鑰匙,拿 名稱 例如。 看截圖:
doc外部數據驗證6

2.然後轉到您要創建的工作簿下拉列表,在工作表中選擇空白列,例如J列,然後單擊 公式 > 定義名稱。 看截圖:
doc外部數據驗證7

3。 在裡面 新名字 對話框中,在 姓名 框,然後選擇 工作簿 來自 範圍 列表,然後鍵入此公式 = Source.xlsx!CustName (“源”是源數據所在的工作簿的工作簿名稱,“ CustName”是您在步驟1中為源數據創建的範圍名稱,您可以根據需要更改它們)。 文本框。 看截圖:
doc外部數據驗證8

4。 點擊 OK。 然後選擇您要創建外部下拉列表的範圍L1:L4,然後單擊 數據 > 數據驗證。 看截圖:
doc外部數據驗證9

5。 在裡面 數據驗證 對話框中單擊 設定 選項卡,然後選擇 名單 下拉列表,然後輸入此公式 =我的客戶清單 (MyCustList是您在步驟3中為空白列提供的範圍名稱,您可以根據需要進行更改)到 資源 框。 看截圖:
doc外部數據驗證10

6。 點擊 OK。 現在,已在另一個工作簿中創建了外部數據驗證。 看截圖:
doc外部數據驗證11

備註:僅當兩個工作簿(源數據工作簿和數據驗證工作簿)同時打開時,外部數據驗證才能正確工作。

最佳辦公生產力工具

🤖 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 (6)
No ratings yet. Be the first to rate!
This comment was minimized by the moderator on the site
"Only when the two workbook are open at the same time (the source data workbook and the data validation workbook), the external data validation can correctly work." Yes this is rather a big problem isn't it? We would not usually have two workbooks open at the same time, we more likely wish to use an old workbook and simply copy the data validation rules to the new spreadsheet. I gave up trying to do this using copy and paste, instead wrote a VBA macro which applied the data validation rule to a large number of cells in one go. Use 'Record Macro' to set up the VBA commands and make minor adjustments to the resulting code to do the trick. Worked fine.
This comment was minimized by the moderator on the site
Glad its not just me that can't get the external data validation to work. Frustratingly it seemed to once but never again. No idea what I did that time.
This comment was minimized by the moderator on the site
Hello, thanks for showing us how to have a drop-down list linked to an external file. However I could not set up the Data Validation to work, even though I have selected to STOP any invalid entry, which a number not included in the drop-down list itself. Is there any way where I can circumnavigate this?
This comment was minimized by the moderator on the site
Create external data validation in different workbook. This tips not working for sharing file one PC to another PC. How it will works? pls. suggest me.
This comment was minimized by the moderator on the site
Sorry I have no idea on this.
This comment was minimized by the moderator on the site
Thank you so much for this article! I could not get Excel to allow me to reference another sheet for a data validation list. I can only surmise that it is because of the version. Very frustrating! However, I did not know about naming the data list, and by doing so and using the =[data list name], it worked like a charm. Many thanks!
There are no comments posted here yet
Please leave your comments in English
Posting as Guest
×
Rate this post:
0   Characters
Suggested Locations