Find second (third...) non-zero value in a column

virtuosok

Board Regular
Joined
Sep 2, 2020
Messages
209
Office Version
  1. 365
Platform
  1. Windows
Hi,
I have the following formula to pull the first non-zero value from a column:
Excel Formula:
=INDEX(N2:N200,MATCH(TRUE,INDEX((N2:N200<>0),0),0))
Which formula should I use to pull the second (third, fourth...) non-zero value? I need at least first 7, ideally first 10 values from the column.
Column N contains numbers only: either zeros, or something >0
 

Excel Facts

Is there a shortcut key for strikethrough?
Ctrl+S is used for Save. Ctrl+5 is used for Strikethrough. Why Ctrl+5? When you use hashmarks to count |||| is 4, strike through to mean 5.
How about in O2 dragged down
Excel Formula:
=INDEX($N$2:$N$200,AGGREGATE(15,6,(ROW($N$2:$N$200)-ROW($N$2)+1)/($N$2:$N$200>0),ROWS(O$2:O2)))
 
Upvote 0
Solution
You're welcome & thanks for the feedback.
 
Upvote 0
One more question though as I also need another formula for matches (in a different column).
is it also possible to pull the adjacent value from column J? I.e. in the above scenario wherever there's >0 value in column N (let's say this happens in cell N20), the formula pulls the value from J20?
 
Upvote 0
Just change the range being indexed.
 
Upvote 0
The problem is that column J doesn't have zero values, all entries in there are >0
Sorry for not mentioning this upfront!
 
Upvote 0
Oops sorry, figured out. Only first part of the formula needed a change... issue solved!
 
Upvote 0
Glad you sorted it & thanks for the feedback.
 
Upvote 0

Forum statistics

Threads
1,215,052
Messages
6,122,878
Members
449,097
Latest member
dbomb1414

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