我在 Excel 中有下面的矩陣,想將其匯入 Access (2016),然后在查詢中使用。目的是能夠根據行和列查找值。例如,10 和 117 的查找條件應回傳 98.1。
這可能嗎?我是 Access 新手,不知道從哪里開始。
| . | 10 | 9 | 8個 | 7 | 6個 | 5個 | 4個 | 3個 | 2個 | 1個 | 0 |
|---|---|---|---|---|---|---|---|---|---|---|---|
| 120 | 100.0 | 96.8 | 92.6 | 86.7 | 78.8 | 68.2 | 54.4 | 37.5 | 21.3 | 8.3 | 0.0 |
| 119 | 99.4 | 96.2 | 92.0 | 86.2 | 78.5 | 67.9 | 54.3 | 37.5 | 21.3 | 8.3 | 0.0 |
| 118 | 98.7 | 95.6 | 91.5 | 85.8 | 78.1 | 67.7 | 54.1 | 37.4 | 21.2 | 8.3 | 0.0 |
| 117 | 98.1 | 95.1 | 90.9 | 85.3 | 77.8 | 67.4 | 54.0 | 37.4 | 21.2 | 8.3 | 0.0 |
| 116 | 97.4 | 94.5 | 90.3 | 84.8 | 77.4 | 67.1 | 53.8 | 37.4 | 21.1 | 8.3 | 0.0 |
| 115 | 96.8 | 93.9 | 89.8 | 84.4 | 77.1 | 66.9 | 53.7 | 37.3 | 21.1 | 8.3 | 0.0 |
uj5u.com熱心網友回復:
考慮創建一個包含 3 列的表來存盤此資料:
Value1 - numeric
Value2 - numeric
LookupValue - currency
然后您可以使用DLookup來獲取所需的值:
?DLookup("LookupValue","LookupData","Value1=117 AND Value2=10")
如果您將值存盤在變數中,則需要將它們連接在:
lngValue1=117
lngValue2=10
Debug.Print DLookup("LookupValue","LookupData","Value1=" & lngValue1 & " AND Value2=" & lngValue2)
轉載請註明出處,本文鏈接:https://www.uj5u.com/qita/535578.html
標籤:数据库ms-access
