Hi Here is my code. It's my first day using excel's VBA tool, and I'm getting a mismatch error on the bolded line. Here is my data set.
Screen Shot 2016-06-27 at 1.06.55 PM.png
![]()
Sub Button1_Click() Dim i As Integer For i = 1 To 3741 Dim count As Integer count = 0 Dim j As Integer j = 0 Do While Cells(i, 3).Value <> 1 If Cells(i, 4).Value <> " " Then j = j + Cells(i, 4).Value End If count = count + 1 i = i + 1 Loop j = j / count Cells(i, 6).Value = j Next i End Sub
Bookmarks