Nhờ anh em giải thích code dùm nhé!!!!! Cám ơn mọi người trước nhé.
On Error Resume NextDim iRow As Long, i As Long, j As Long, diem As Double
iRow = Sheet2.Range("B65000").End(xlUp).Row
With Sheet1
For i = 1 To .OLEObjects.Count
If TypeName(.OLEObjects(i).Object) = "OptionButton" Then
If .OLEObjects(i).Object = True Then
For j = 1 To iRow - 4
If .OLEObjects(i).Object.GroupName = "cau" & j And .OLEObjects(i).Object.Caption = Sheet2.Cells(j + 4, 3) Then diem = diem + Sheet2.Cells(3, 4)
Next
End If
End If
Next
.Cells(5, 3) = "0" + diem
End With