Dim tb1 As Table = Tables("场地空闲") Dim tb2 As Table = Tables("人员空闲") For Each r As Row In tb1.Rows For i As Integer = 0 To tb1.Cols.Count - 1 If r(i) = Nothing Then For Each rr As Row In tb2.Rows If rr(i) = Nothing Then r(i) = rr("_Identify") rr(i) = r("_Identify") Exit For End If Next End If Next Next