For Each dr As Row In Tables("数据").Rows Dim h As DataRow=DataTables("标准").Find("下限>=" & dr("金额") & "and 上限<" & dr("金额")) If h IsNot Nothing Then '如果找到的话 dr("标准")=h("标准") End If Next
这样能取到值:
For Each dr As Row In Tables("数据").Rows Dim h As DataRow=DataTables("标准").Find("下限>=" & dr("金额")) If h IsNot Nothing Then '如果找到的话 dr("标准")=h("标准") End If Next