Lol. The sum of all rows = the sum of all cols. If you wanted to total each row or col seperately, that would be different. But it would display the number of rows + the number of cols amount of results (ie not 2, unless your taking about a 1x1 array >.< ).
Think of it this way, your code will only result in values being added for squares with a letter, while ignoring all the other values. If this is what's wanted then you are indeed right, but then what's the point of the rest of the data in the array? (assuming you reset cols to 0 after the first loop)
For Each ctrl As Control In Me.Controls("pnlMainPanel").Controls
If ctrl.GetType Is GetType(System.Windows.Forms.Panel) Then
For Each subCtrl As Control In ctrl.Controls
If subCtrl.GetType Is GetType(System.Windows.Forms.TextBox) Then
If subCtrl.GetType Is ...