Dim k() As String = {1,2,3,4,5} Dim v() As String = {"第一室","第二室","第三室","第四室","第五室"} Dim dic As new Dictionary(Of String, String) For i As Integer = 0 To k.Length - 1 dic.Add(k(i), v(i)) Next
For Each r As Row In Tables("表A").Rows If dic.ContainsKey(r("第一列")) Then r("第二列") = dic(r("第一列")) End If Next