Find Second Non-Zero Value In A Column

mlarson

Well-known Member
Joined
Aug 25, 2011
Messages
509
Office Version
  1. 2010
Platform
  1. Windows
Hi there, I'd like to find the second non-zero value in a range (A13:A200) and have the output be in A9. So, in the example below, "Wilson, John" would be the output in A9. Hope this is easy. Thanks in advance!

0
0
0
Smith, Joe
0
0
Wilson, John
Jones, Sally
0
0
Johnson, Eric
0
Clark, Bill
0
 
Reconfirming basically what Fluff has said ..

The cells contain 0, not "0"...
That actually isn't so, per the red part of your formula below.
Sure.
In A13... =IF(AND($F13="Yes",A$12>=$J13,A$12<=$K13),$D13,"0")

So, try the post #4 formula, or, if you really want zero number values rather than zero text values, change you formula to
=IF(AND($F13="Yes",A$12>=$J13,A$12<=$K13),$D13,0)


BTW, even if the 0 values are numbers, not text, the post #6 code will fail in at least a couple of circumstances:
i) If all the formulas are returning text values (only one area of text values)
ii) If the first text area contains more than one value (1st value from 2nd area will be returned rather than the requested "second non-zero value")
 
Upvote 0

Excel Facts

Copy a format multiple times
Select a formatted range. Double-click the Format Painter (left side of Home tab). You can paste formatting multiple times. Esc to stop
Reconfirming basically what Fluff has said ..

That actually isn't so, per the red part of your formula below.


So, try the post #4 formula, or, if you really want zero number values rather than zero text values, change you formula to
=IF(AND($F13="Yes",A$12>=$J13,A$12<=$K13),$D13,0)


BTW, even if the 0 values are numbers, not text, the post #6 code will fail in at least a couple of circumstances:
i) If all the formulas are returning text values (only one area of text values)
ii) If the first text area contains more than one value (1st value from 2nd area will be returned rather than the requested "second non-zero value")

My mistake! Yes, I tried Post#4 formula and it works beautifully now. Thank you all for your help!
 
Last edited:
Upvote 0

Forum statistics

Threads
1,216,444
Messages
6,130,659
Members
449,585
Latest member
Nattarinee

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