I Need help with the following code..
What I would like to do is to count the number of entries by certain person(initial) for certain date(date entered). in range A1:A10 are dates of entered and B1:B10 are their initials. Im having problem with my codes i think especially with making the date as a criteria, the result is showing 0 however really it should not. I really would like to make use of the input box if possible.
HERE IS THE CODE
Sub GetDataEntered()
Dim myFormula As String
Dim strInitial As String
Dim dtDateEntered As Date
Format dtDateEntered, "dd/mm/yy"
strInitial = InputBox("Enter Your Initial: ")
dtDateEntered = InputBox("Enter Date Entered: ")
myFormula = "sumproduct(--(A1:A10= """ & dtDateEntered & """),--(B1:B10= """ & strInitial & """))"
MsgBox ActiveSheet.Evaluate(myFormula)
End Sub
sumproduct.xlsm
Bookmarks