Display values only of the first X Occurences of a condition in a small range .

Sharky007

New Member
Joined
Sep 25, 2018
Messages
2
Hi...

Could anyone help me with a solution to this.

i am wondering if there is a function that will help me find... say 1st/2nd etc occurences of a condition in a list ?

e.g.

I want to pick out the first 3 numbers (say) that are over zero.

so if my list is 0.00, 23.45, 45.67, 0.00, 0.00, 78.90, 98.76 then I want ONLY 23.45, 45.67 and 78.90. (the first 3 numbers that are over zero only)

if my list is 12.34, 0.00, 0.00, 56.78, 0.00 ,0.00 ,0.00 .... then I only have 12.34, 56.78 and then a 0.00.

My actual aim and therefore next step would be to determine the position of those found values in their original lists, but I can do that using the MATCH function.

I mention both steps as ideally if I can get the positions in the lists without the middle step then great.

Any clues even would be a massive help as I seem to have gone around in circles with this one.

Thanks in advance.


Dave (Sharky007)
 

Excel Facts

How to fill five years of quarters?
Type 1Q-2023 in a cell. Grab the fill handle and drag down or right. After 4Q-2023, Excel will jump to 1Q-2024. Dash can be any character.
Hi & welcome to MrExcel
How about


Book1
BCD
20.003
323.454
445.679
50.00
60.00
70.00
80.00
978.90
1098.76
Roster
Cell Formulas
RangeFormula
D2{=MATCH(SMALL(IF($B$2:$B$10>0,$B$2:$B$10),ROWS($1:1)),$B$2:$B$10,0)+1}
Press CTRL+SHIFT+ENTER to enter array formulas.
 
Upvote 0

Forum statistics

Threads
1,223,896
Messages
6,175,264
Members
452,627
Latest member
KitkatToby

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