我在Excel中有一個表格,其中包含列和行標題以及相應的值。如何在Excel中按表中的值查找列和行標題名稱/索引?Mathematica在Excel中的位置函數用於按值查找矩陣
在數學等價功能位置[listoflist,值]
編輯:
我做在VBA的簡單功能,但這是遠遠不夠完善
Function MathematicaPosition(lookvalue As Range, TableRange As Range, RowOrColumn As Boolean) As Integer
Dim r As Integer
Dim c As Integer
Dim tempindex As Integer
Dim i As Integer, j As Integer
tempindex = 0
r = TableRange.Rows.Count
c = TableRange.Columns.Count
For i = 1 To r
For j = 1 To c
If lookvalue.Value = TableRange.Cells(i, j).Value Then
tempindex = IIf(RowOrColumn, i, j)
End If
Next j
Next i
MathematicaPosition = tempindex
End Function
爲什麼Mathematica標籤被刪除? – denfromufa
我在這方面幾乎沒有找到任何指導,但我同意@belisarius - 在極端情況下,「如何按字母順序排序?」不適合說一個[英文]標籤。 「標籤是描述問題主題的詞或短語。標籤是一種連接專家的方式,他們可以通過將問題分類到特定的,明確定義的類別來回答問題。「[參考資料](http://stackoverflow.com/help/tagging)。對我來說,一個[mathematica]標籤意味着你正在尋找'位置' - 但你已經知道了。 – pnuts