Dim dt As DataTable = DataTables("表A") Dim i As Integer = 1 Dim flag As Boolean = True For Each dr As DataRow In dt.Select("", "第二列 desc") output.show(Math.Abs(i) & " " & dr("第二列") & " " & dr("第一列")) If flag = True i += 1 Else i -= 1 End If If i = 5 Then flag = False i = 4 ElseIf i = 0 Then flag = True i = 1 end if Next