So basically what I'm trying to do is count the duplicate values in a certain "column8" avoiding the rows that are "NO" in column17. The table would be like this:
| column8 | column17 |
|---|---|
| 014 | NO |
| 014 | |
| 013 | NO |
| 013 | |
| 014 | |
| 017 |
and my code looks like this:
For Count As Integer = 0 To DataGridView1.Rows.Count - 1
If DataGridView1.Rows(Count).Cells("Column17").Value <> "NO" Then
Chart1.Series(0).Points.AddXY(DataGridView1.Item(8, Count).Value,
DataGridView1.Item(8, Count).Value)
End If
Next Count
It get the names, but the count doesn't made sense at all. The result that I need is the chart with the name of the column8, with how many have repeat not including the ones that have "NO" in column17. Something like this:
014 2
013 1
017 1
Any help is really appreciated. Thanks!