View Single Post
  #1   Report Post  
Aramazd Aramazd is offline
Junior Member
 
Posts: 5
Default Calculating a countif with sumproduct + Date

Hello,

Is it possible to improve this piece of code?

Currently I cannot run it, it tells me I need a ")" on the date paremeter.

Can somebody tell me what am I doing wrong?

Thanks in advance.

iIncidentsMC = iIncidentsMC + Application.WorksheetFunction.SumProduct(--(Sheets("Incidents").Range("F1:F65535"<=DATE(2012, 4, 31))*(--Sheets("Incidents").Range("F1:F65535"=Date(2012,4 ,1)*(Sheets("Incidents").Range("C1:C65535" = "Marcus Cominus"))