Dim x As Integer For Each red As DataGridViewRow In DataGridView1.Rows 'Dim rednibroj As Integer = DataGridView2.Rows.Count - 1 x = x + 1 If x Mod 3 = 0 Then MsgBox (oDataGridView1.Rows(i - 1).Cells(1).Value) End If Next