I'm trying to count number of times a condition that can be true based on whether the condition matches, and if the date is within a certain range.

I want result in column `F` based on these conditions: 

* If Columns `A` and `H` match than
* If Column `B` is less than or equal to column `I` than
	+ Column `C` and `J` match
	+ Column `D` and `K` match

If column `A` and `H` matches and rest of the 3 conditions also match, than I want to find how many times all the 4 conditions have been true?

For example, in the image below, `123abc` in cell A2 matches with `H4` and `H6`. Similarly the rest 3 conditions are also true, so count is 2. Hence, `F2` cell should have result as `2`.

***Alternatively***, I also tried to pull in the dates in `I4` and `I6` in result cell `F2` when the conditions are true. But no luck!

I figured an array formula with `INDEX`/`MATCH`, but have not been successful. The formula I tried is:

```
{=IFERROR(A2=INDEX($H$2:$H$10,MATCH(1,(($I$2:$I$10>=B2)*($J$2:$J$10=C2)*($K$2:$K$10=D2)),0)),"NA")}

```

Can anyone help me with this?

EDIT1:

My data looks similar to this:

```
|   A    |      B     |  C  |  D  | E | F |   G    |      H     |  I  |  J  |
|--------|------------|-----|-----|---|---|--------|------------|-----|-----|
| 123abc | 10/24/2018 | XYZ | 123 |   |   | 234xyz | 4/29/2018  | XYZ | 234 |
| 234xyz | 1/21/2019  | ABC | 234 |   |   | 456abc | 4/30/2018  | ABC | 456 |
| 789pqr | 4/30/2018  | PQR | 789 |   |   | 123abc | 10/24/2018 | ABC | 123 |
|        |            |     |     |   |   | 234xyz | 3/29/2019  | XYZ | 234 |
|        |            |     |     |   |   | 123abc | 3/20/2019  | ABC | 123 |
|        |            |     |     |   |   | 501xyz | 4/30/2018  | XYZ | 501 |
|        |            |     |     |   |   | 789pqr | 3/30/2018  | PQR | 789 |
|        |            |     |     |   |   | 789pqr | 4/30/2018  | PQR | 789 |
|        |            |     |     |   |   | 310jkl | 4/30/2017  | JKL | 310 | 

```

|

[![Data Sample](https://i.stack.imgur.com/v1T6n.png)](https://i.stack.imgur.com/v1T6n.png)