[英]Populate Dropdown Box if 2 columns match with values from 3rd column
我在 Excel 中使用數據驗證列表來處理基於數據庫中的數據字典的內容。 設置如下:
Sheet1
column A - DB Table Name (repeats for as many rows as there are associated values in column B)
Column B - List of all values associated with the DB table name in column A
Example Sheet1
Column A | Column B
DB1 | ValueA1
DB1 | ValueA2
DB1 | ValueA3
DB2 | ValueB1
DB3 | ValueC1
DB3 | ValueC2
在工作表 2 上,我在從表格填充的單元格 D1 中有一個下拉數據驗證。 表中的所有選項都是 Sheet1 的 ColumnA 中的 DB 名稱。 基於從 Sheet2 上的單元格 D1 中選擇的數據庫,我希望 sheet2 的 B1 是來自 Sheet1 列 B 的所有匹配值的下拉列表,其中 Sheet2 單元格 D1 與 Sheet1 列 A 匹配。
示例:人員在 Sheet2 單元格 D1 中選擇 DB3。 然后 Sheet2 中的單元格 B1 成為包含值 [ValueC1, ValueC2] 的下拉列表。 這些是來自 Sheet1 的 B 列值,名稱與 Sheet2 D1 和 Sheet1 列 A 匹配。
用 Index 和 vlookup 嘗試了很多東西,但我沒有得到多個結果,所以數據驗證不會采用公式,因為它只返回一個結果。
我希望這是有道理的...
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.