#### cyanide

##### New Member
Hello everyone!

I dont know how to add 2 new condition to this array.

=IFERROR(MATCH(0;(\$Y\$5:\$Y\$165<=2)*(\$Y\$5:\$Y\$165>=0);0)-1;ROWS(\$Y\$5:\$Y\$165))

Because I want to count from last true condition (where Y=3 and also C=21:00-22:00), all false values (where Y<=2 and C<=21:55.

Best Regards!
Happy Holidays & Merry Christmas!

### Excel Facts

Select range. Press Ctrl+1. On Number tab, choose Custom. Type Alt+7 then space then @ sign (using 7 on numeric keypad)

#### cyanide

##### New Member
Hello everyone!

I dont know how to add 2 new condition to this array.

=IFERROR(MATCH(0;(\$Y\$5:\$Y\$165<=2)*(\$Y\$5:\$Y\$165>=0);0)-1;ROWS(\$Y\$5:\$Y\$165))

Because I want to count from last true condition (where Y=3 and also C=21:00-22:00), all false values (where Y<=2 and C<=21:55.

Best Regards!
Happy Holidays & Merry Christmas!

I can't Edit the post... *all false values (where Y<=2 and C<=20:55.

##### MrExcel MVP
What doesthe IFERROR formula you posted do?

#### cyanide

##### New Member
What doesthe IFERROR formula you posted do?

The current formula IFERROR count after the last value of row where Y=3, from down to up till new Y=3 to reset.
Example how my IFERROR work at this moment:

Column Y
Row 1 0 (value) here, my formula have value 4
Row 2 1 (value)
Row 3 2 (value)
Row 4 1 (value) my formula start count from here till new 3 value insert
Row 5 3 (value) my formula will reset here (value 0)
Row 6 2 (value)

But, I want add as I said, 2 new condition for this, I want to count as you can see little up + Column with time value, the formula must compare column with time value.

So, I want to respect the current condition of IFERROR + \$C>=09:00 and \$C<=20:55
The formula will reset value as you see, if the value of column Y are 3, so, I want from this point, if value 3 inserted in column Y, to compare thr same row of column C. Example: If \$Y\$1=3 & \$C\$1=21:00-22:00, formula will reset value in cell that formula exist.

Thanks for response.
Best Regards!

#### cyanide

##### New Member
What doesthe IFERROR formula you posted do?

#### cyanide

##### New Member

I have modif columns to sow you what I want... so column C are A now, time values.
So, in H1 we have value 4, because B5 have value 3, the second condition will must compare: G5 (value 3) and A5 (value between 21:00-22:00), if conditions not egual, don't reset to value 0 in H1 where IFERROR formula is.

##### MrExcel MVP
Would you post the upper exhibit of post #6 in an Excel readable form, A:E as is while G showing the desired results under new conditions?

#### cyanide

##### New Member
Would you post the upper exhibit of post #6 in an Excel readable form, A:E as is while G showing the desired results under new conditions?

As I said, my formula works properly, as I want, but I want to add one more condition.
The new condition that I want is: A<=20:55 (this condition must be insert in the current formula that you can see in the screens).

So, let me explain you little, let take the 1st screen where H1 have value 4. Without my new condition the result of H1 is 4, with this formula + my new condition, H1 must have the same result as now (4), because, 1st condition <=2 have value 3 in G5, also 2nd condition (not inserted) <=20:55 exist in A5.

#### cyanide

##### New Member
I don't know how to tell the formula to check multiple condition like: G1:G100<=2 AND A1:A100<=20:55, and the result in AA1 for example.
The formula must counts all rows where contions meet and reset value in AA1 where conditions are out of value, like G1:G100=3 and A1:A100>=21:00

I hope you understand me.

Replies
6
Views
356
Replies
10
Views
528
Replies
1
Views
1K
Replies
5
Views
495
Replies
0
Views
429

1,191,386
Messages
5,986,315
Members
440,017
Latest member
vasanrajeswaran

### We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.

### Which adblocker are you using?

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

### Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

### Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back