[d2] = [SUMPRODUCT((data!A2:A14000=verify!A2)*(data!B2:B14000>=verify!B2)*(data!C2:C14000<=verify!C2),(data!D2:D14000))]
Private Sub CmdCheck_click()
'insert data to perform SUMPRODUCT
Worksheets("verify").Range("a2").Value = TxtID.Value
Worksheets("verify").Range("b2").Value = TxtStart.Value
Worksheets("verify").Range("c2").Value = TxtEnd.Value
'Module Sumproduct
Sumproduct
'Show working time in Txttime
Txttime.Value = Worksheets("verify").Range("d2").Text
End Sub
Sub Sumproduct()
' Sumproduct Macro
Worksheets("verify").Range("D2").Select
[D2] = [SUMPRODUCT((data!A2:A14000=verify!A2)*(data!B2:B14000>=verify!B2)*(data!C2:C14000<=verify!C2),(data!D2:D14000))]
End Sub