Count consecutive cells above a certain value

Chrisscpu

New Member
Joined
Mar 14, 2016
Messages
6
I am trying to count the number of cells above a certain value in a table consecutively from right to left. I need it to stop counting if above 85%
.50.88.75.86.90
.50.90.70.75.80
.20.80.82.80
.84

<tbody>
</tbody>

So for the above table, the correct response (in a column F not pictured) would be:
0 (1st value is above 85%)
3 (4th value is above 85%)
5 (none are above 85%)

I have been trying to amend the following formula with a ctrl, shift enter:
={IFERROR(COLUMN(P2)-COLUMN(INDEX(D2:P2,,MATCH(9.99E+307,IF(D2:P2=0,1,"")))),0)}

Any help is greatly appreciated, and if the above formula is not feasible with this issue, that's fine. I'll take anything that works. I have a feeling I'm overlooking something pretty basic.
 

Excel Facts

Enter current date or time
Ctrl+: enters current time. Ctrl+; enters current date. Use Ctrl+: Ctrl+; Enter for current date & time.
In F2, copy down:
Code:
=IFERROR(5-LOOKUP(2,1/($A2:$E2>0.85),COLUMN($A2:$E2)-COLUMN($A2)+1),5)
 
Upvote 0
Thank you very much. I had to adapt to a larger sheet, so if anyone wants to see the variables, here is for a 13 column chart starting at D.

=IFERROR(13-LOOKUP(2,1/($D2:$P2>0.85),COLUMN($D2:$P2)-COLUMN($D2)+1),13)
 
Upvote 0
You're welcome. :cool:

I deliberately provided an adaptable formula with COLUMN($A2:$E2)-COLUMN($A2)+1 rather than {1, 2, 3, 4, 5}
 
Upvote 0

Forum statistics

Threads
1,214,854
Messages
6,121,941
Members
449,056
Latest member
denissimo

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.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

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

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

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
Back
Top