title: VB- How to search for a letter in a datagridview
body: <p>Basically, I want a label to record the number of times the "A" letter has been used in a specific column. i have made this code but it did not work. I am new to coding on VB- please help.</p>
  
  <pre><code>Private Sub Form1_Load
      Dim agrade As Integer = 0
      For Each rw As DataGridViewRow In dgvNames.Rows
          For i As Integer = 0 To rw.Cells.Count - 1
              If rw.Cells(i).Value = "A" Then
                  agrade = +1
                  lblA_star.Text = astar
              End If
          Next
      Next
  End Sub
  </code></pre>