I am looking to sum A:G (Mon-Sun) only if the Status is Active.(Col I). I want this inserted to Column H(Total)
CodePudding user response:
Try SUMPRODUCT()
-
=SUMPRODUCT((A2:G50000)*(H2:H50000="Active"))
CodePudding user response:
Private Sub CommandButton1_Click()
For y = 7 To 8
Range("H" & y).Clear
If Range("I" & y) = "ACTIVE" Then
Range("H" & y).Clear
For i = 1 To 7
Range("H" & y) = Cells(y, 8) Cells(y, i)
Next i
End If
Next y
End Sub
U can do with button i think its will be better