Hello,
i am trying to use sumproduct/countifs function and one of the values to be compared is Date. If it is a not a "date" type it works but otherwise it throws error value. can someone help me out on this please?
Atype and Adate are defined names
Sub tes()
ValueX = Range("b1").Value
ValueY = Range("a1").Value ' Date value
Range("c1").Value = Evaluate("=sumproduct((Atype=""" & ValueX & """)*(Adate= """ & ValueY & """ ))")
Range("c1").Value = Evaluate("=countifs((Atype,""" & ValueX & """,Adate, """ & ValueY & """ )")
End Sub
Thanks
Bookmarks