How should i modify mentioned below codes to take result c2 too c25 in sheet3 by matching a2 to a25 ?
HTML:
Sub Commission_Total()
Dim ThisCell As Range
Dim CommTotal As Long
For Each ThisCell In Sheet2.Range("A1:A" & Range("A65536").End(xlUp).Row)
If ThisCell.Value = Sheet3.Range("A2") And ThisCell.Offset(, 1) = "sc" Then
CommTotal = CommTotal + ThisCell.Offset(, 2).Value
End If
Next ThisCell
Sheet3.Range("C2") = CommTotal
End Sub