不明白你说的什么大于16、30,根据什么比较?
大致代码参考
Dim dt As DataTable = DataTables("表A")For Each key As String In dt.GetValues("第一列") Dim drs As List(of DataRow) = dt.Select("第一列 = '" & key & "'") For i As Integer = 0 To drs.count-1 drs(i)("第二列") = drs(i)("第一列") & i+1 NextNext