title: VB.NET - If not Datagridview cell empty
body: <p>Gradebook -
  I have 5 cells (Homeworks, Ex1, Ex2, Ex3, FinalExam) to fill in Datagridview, My app works with normal numbers but when the user type "0" in cells Then the grade wont display. (not sum) . Here a sample of my source code:</p>
  
  <pre><code> Total = Val(HW + Ex1 + Ex2 + Ex3 + FinalEx) / 5
  If Not (DataGridView1.Rows(i).Cells(2).Value) = String.Empty And
          (DataGridView1(i).Cells(3).Value) And (DataGridView1(i).Cells(4).Value) And
          (DataGridView1.Rows(i).Cells(5).Value) And (DataGridView1.Rows(i).Cells(6).Value) Then
              If Total &gt;= 90 Then
                  DataGridView1(i).Cells(7).Value = "A"
  </code></pre>