Pick up the first positive (non Zero) number in a range

masim

Board Regular
Joined
Jun 19, 2003
Messages
130
Hi

here is my range starting from say C1.

-1920 -56 -988 0 0 95 25 1222

How can i pick first positive non zero number (in this case 95) ?

Thanks
Asim
 
Hi all;

Considering various scenarios, this is my best and final offer ( :lol: )


=SMALL(C1:J1,COUNTIF(C1:J1,"<=0")+1)
 
Upvote 0

Excel Facts

Excel motto
Not everything I do at work revolves around Excel. Only the fun parts.
Raider said:
Hi all;

Considering various scenarios, this is my best and final offer ( :lol: )


=SMALL(C1:J1,COUNTIF(C1:J1,"<=0")+1)

That would produce quite often a wrong number.
Book7
CDEFGHIJ
100-35-7-21
2
35
45
5
Sheet1


C3:

=INDEX(C1:J1,MATCH(TRUE,C1:J1>0,0))

which must be confirmed with control+shift+enter, not just with enter.

C4:

=INDEX(C1:J1,MATCH(1,INDEX(--(C1:J1>0),1,0),0))

which is simply confirmed with enter.

The Small formula would give here 1 as result, which is not an intended result.
 
Upvote 0

Forum statistics

Threads
1,224,827
Messages
6,181,195
Members
453,021
Latest member
pingpong7117

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