Spreadsheet: 171206d1343659633-sumproduct-based-on-two-conditions-of-1-one-column-excelq-sumprod
Sheet: Sheet1

 | 1 | 2 | 3 | 4 | Date received | Aspect | TRADE DATE
 |  |  |  |  | 2012-05-25 00:00:00 | no | 2012-05-15 00:00:00 |  | 2012-07-16 00:00:00 | 2012-07-17 00:00:00 | 2012-07-18 00:00:00 | 2012-07-19 00:00:00 | 2012-07-20 00:00:00
 |  |  |  |  | 2012-05-20 00:00:00 | no | 2012-05-16 00:00:00
 |  |  |  |  | 2012-05-30 00:00:00 | yes | 2012-05-17 00:00:00 |  |  |  |  |  |  | [NAME]
 |  |  |  |  | 2012-06-18 00:00:00 | yes | 2012-05-22 00:00:00 |  | 12 |  |  |  |  | ANSWER SHOULD BE
 |  |  |  |  |  | yes | 2012-05-22 00:00:00
 |  |  |  |  |  | no | 2012-05-22 00:00:00 |  |  |  |  |  | SUMPRODUCT((H2:H75<=J2)*(F2:FH275>J2&" "))
 |  |  |  |  | 2012-07-18 00:00:00 | no | 2012-05-27 00:00:00
 |  |  |  |  | 2012-07-16 00:00:00 | yes | 2012-05-27 00:00:00
 |  |  |  |  | 2012-07-17 00:00:00 | yes | 2012-06-02 00:00:00
 |  |  |  |  | 2012-06-22 00:00:00 | no | 2012-06-04 00:00:00
 |  |  |  |  | 2012-06-20 00:00:00 | no | 2012-06-08 00:00:00
 |  |  |  |  | 2012-06-10 00:00:00 | yes | 2012-06-09 00:00:00
 |  |  |  |  | 2012-07-17 00:00:00 | no | 2012-06-09 00:00:00
 |  |  |  |  | 2012-06-12 00:00:00 | yes | 2012-06-10 00:00:00 |  | How many dates have not been received at 16 July (cell J2)?
 |  |  |  |  | 2012-06-30 00:00:00 | yes | 2012-06-11 00:00:00
 |  |  |  |  |  | yes | 2012-06-11 00:00:00 | 1 | For this we have to look at all trades smaller or same as 16 July so <=J2 (in column H)
 |  |  |  |  | 2012-07-18 00:00:00 | no | 2012-06-11 00:00:00 | 2 | Of these cells only the cells which have an value "yes" in column G
 |  |  |  |  | 2012-07-14 00:00:00 | yes | 2012-06-11 00:00:00 | 3 | How many of these cells have a date above 16 July or an empty date in column F |  |  |  |  |  |  | Here is the problem
 |  |  |  |  | 2012-07-17 00:00:00 | yes | 2012-06-12 00:00:00
 |  |  |  |  | 2012-06-20 00:00:00 | yes | 2012-06-12 00:00:00 |  | I want to do it with sumproduct and not with countifs , due to other restrictions
 |  |  |  |  | 2012-06-15 00:00:00 | no | 2012-06-13 00:00:00
 |  |  |  |  | 2012-06-15 00:00:00 | yes | 2012-06-14 00:00:00 |  | Hope someone can help me
 |  |  |  |  | 2012-07-17 00:00:00 | yes | 2012-06-15 00:00:00
 |  |  |  |  | 2012-06-20 00:00:00 | yes | 2012-06-15 00:00:00
 |  |  |  |  |  | no | 2012-06-16 00:00:00
 |  |  |  |  |  | yes | 2012-06-16 00:00:00
 |  |  |  |  | 2012-07-18 00:00:00 | yes | 2012-06-17 00:00:00
 |  |  |  |  | 2012-07-16 00:00:00 | yes | 2012-06-17 00:00:00
 |  |  |  |  | 2012-07-17 00:00:00 | yes | 2012-06-17 00:00:00
 |  |  |  |  | 2012-06-20 00:00:00 | yes | 2012-06-18 00:00:00
 |  |  |  |  |  | no | 2012-06-18 00:00:00
 |  |  |  |  | 2012-06-20 00:00:00 | no | 2012-06-19 00:00:00
 |  |  |  |  | 2012-07-17 00:00:00 | no | 2012-06-19 00:00:00
 |  |  |  |  | 2012-06-25 00:00:00 | yes | 2012-06-20 00:00:00
 |  |  |  |  | 2012-07-20 00:00:00 | yes | 2012-06-20 00:00:00
 |  |  |  |  | 2012-07-21 00:00:00 | yes | 2012-06-20 00:00:00
 |  |  |  |  | 2012-07-18 00:00:00 | yes | 2012-06-21 00:00:00
 |  |  |  |  | 2012-07-16 00:00:00 | yes | 2012-06-21 00:00:00
 |  |  |  |  | 2012-07-17 00:00:00 | no | 2012-06-22 00:00:00
 |  |  |  |  | 2012-06-25 00:00:00 | yes | 2012-06-22 00:00:00
 |  |  |  |  | 2012-06-25 00:00:00 | yes | 2012-06-23 00:00:00
 |  |  |  |  | 2012-06-26 00:00:00 | yes | 2012-06-24 00:00:00
 |  |  |  |  | 2012-07-17 00:00:00 | yes | 2012-06-25 00:00:00
 |  |  |  |  | 2012-06-30 00:00:00 | yes | 2012-06-25 00:00:00
 |  |  |  |  |  | no | 2012-06-25 00:00:00
 |  |  |  |  |  | no | 2012-06-26 00:00:00
 |  |  |  |  | 2012-06-30 00:00:00 | no | 2012-06-26 00:00:00
 |  |  |  |  | 2012-06-30 00:00:00 | no | 2012-06-27 00:00:00
 |  |  |  |  | 2012-07-18 00:00:00 | yes | 2012-06-27 00:00:00
 |  |  |  |  | 2012-06-30 00:00:00 | yes | 2012-06-28 00:00:00
 |  |  |  |  | 2012-06-30 00:00:00 | no | 2012-06-29 00:00:00
 |  |  |  |  | 2012-06-30 00:00:00 | no | 2012-06-29 00:00:00
 |  |  |  |  | 2012-07-17 00:00:00 | no | 2012-06-30 00:00:00
 |  |  |  |  | 2012-07-02 00:00:00 | no | 2012-06-30 00:00:00
 |  |  |  |  |  | no | 2012-07-01 00:00:00
 |  |  |  |  |  | no | 2012-07-02 00:00:00
 |  |  |  |  | 2012-07-18 00:00:00 | yes | 2012-07-03 00:00:00
 |  |  |  |  | 2012-07-16 00:00:00 | yes | 2012-07-04 00:00:00
 |  |  |  |  | 2012-07-17 00:00:00 | yes | 2012-07-05 00:00:00
 |  |  |  |  | 2012-07-07 00:00:00 | no | 2012-07-06 00:00:00
 |  |  |  |  | 2012-07-14 00:00:00 | no | 2012-07-06 00:00:00
 |  |  |  |  | 2012-07-10 00:00:00 | no | 2012-07-06 00:00:00
 |  |  |  |  | 2012-07-17 00:00:00 | no | 2012-07-07 00:00:00
 |  |  |  |  | 2012-07-12 00:00:00 | yes | 2012-07-08 00:00:00
 |  |  |  |  |  | no | 2012-07-09 00:00:00
 |  |  |  |  |  | no | 2012-07-09 00:00:00
 |  |  |  |  | 2012-07-18 00:00:00 | no | 2012-07-10 00:00:00
 |  |  |  |  | 2012-07-16 00:00:00 | no | 2012-07-10 00:00:00
 |  |  |  |  | 2012-07-17 00:00:00 | no | 2012-07-10 00:00:00
 |  |  |  |  | 2012-07-14 00:00:00 | no | 2012-07-11 00:00:00
 |  |  |  |  |  | yes | 2012-07-12 00:00:00
 |  |  |  |  | 2012-07-15 00:00:00 | yes | 2012-07-13 00:00:00
 |  |  |  |  |  | no | 2012-07-15 00:00:00
 |  |  |  |  |  | yes | 2012-07-17 00:00:00