Private Sub test() Dim Table As DataTable Dim c As Integer Dim intData As Integer For Each Row As DataRow In Table.Rows intData = MyCInt(Row(0)) If intData = 0 Then Continue For If intData <> c + 1 Then Continue For Next End Sub Public Function MyCInt(ByVal Value As Object) As Integer 'この条件は仕様に応じて変更してください If IsDBNull(Value) Then Return 0 Else Return CInt(Value) End If End Function