index match 1st number above 0, only next 10 rows

ste33uka

Active Member
Joined
Jan 31, 2020
Messages
471
Office Version
  1. 365
Platform
  1. Windows
Hi would anyone have formula for index match, that would return 1st value above 0, but only for next 10 rows,
So in examle index match apple,in would return '12'
Book1
ABCDEFGHI
1apple
2apple0
312
40
50
67
70
80
916
100
110
120
130
147
150
1616
170
180
190
200
21
22
Sheet1
 

Excel Facts

Test for Multiple Conditions in IF?
Use AND(test, test, test, test) or OR(test, test, test, ...) as the logical_test argument of IF.
Hi Ste33uka,

I don't understand "but only for next 10 rows "? Could you give an example and indicate where you'd like the answer? Thanks!

This returns the first non-zero cell
=INDEX($C$2:$C$20,AGGREGATE(15,6,ROW($C$2:$C$20)-ROW($C$1)/($C$2:$C$20>0),1))
 
Upvote 0
Answer could be in h1, what i mean is when match is found, only look in next 10 rows, so in example it would only look at rows 2 to 11.
Thanks
Book1
ABCDEFGH
1apple12
2apple0
312
40
50
67
70
80
916
100
110
120
130
147
150
1616
170
180
190
200
21
Sheet1
Cell Formulas
RangeFormula
H1H1=INDEX($C$2:$C$20,AGGREGATE(15,6,ROW($C$2:$C$20)-ROW($C$1)/($C$2:$C$20>0),1))
 
Upvote 0
It seems like you're saying it's always 2 to 11 but I'm guessing maybe you only want to start in the row where G1 is found in column A?

This would do that for you


Ste33uka.xlsx
ABCDEFGH
1apple12
2apple0
312
40
50
67
70
80
916
100
110
120
130
147
150
1616
170
180
190
200
Sheet1 (2)
Cell Formulas
RangeFormula
H1H1=INDEX(C:C,AGGREGATE(15,6,ROW(OFFSET($C$1,MATCH($G$1,$A$2:$A$9999,0),,10))/((OFFSET($C$1,MATCH($G$1,$A$2:$A$9999,0),,10)>0)),1))
 
Upvote 0
.. another version

20 08 15.xlsm
ABCDEFGH
1apple12
2apple0
312
40
50
67
70
80
916
100
110
120
130
147
150
1616
170
180
190
200
1st > 0
Cell Formulas
RangeFormula
H1H1=INDEX(OFFSET(INDEX(C:C,MATCH(G1,A:A,0)),,,10),MATCH(TRUE,OFFSET(INDEX(C:C,MATCH(G1,A:A,0)),,,10)>0,0))
 
Upvote 0
You're welcome. Glad we could help. Thanks for the follow-up. :)
 
Upvote 0

Forum statistics

Threads
1,215,045
Messages
6,122,840
Members
449,096
Latest member
Erald

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