Second To Last Value Greater Than Zero In A Column

anwaee2

Board Regular
Joined
Sep 13, 2012
Messages
151
Office Version
  1. 2011
Platform
  1. MacOS
I need help again. I have a range of values in range B6:B42. There are some blank cells and the values are not ascending or descending. They are mixed. I need to find the second to last value that is greater than zero in that column ignoring any of the blank cells. Sometimes there might be two or three blank cells between the values. I am not opposed to using a helper column if necessary.
Thanks to all in advance. This forum has been the best and very appreciatived.
 

Excel Facts

Square and cube roots
The =SQRT(25) is a square root. For a cube root, use =125^(1/3). For a fourth root, use =625^(1/4).
Hi,

You can following Array Formula :

Code:
=Index(B6:B42,Large(If(B6:B42<>"",Row(B6:B42)),2))

Hope this will help
 
Upvote 0
Thank you for your reply. Unfortunately I get a Zero with this formula. The same result I have gotten with other formulas too. Below is a small sample of my column "B". The answer I am would like to get is 184, the second value greater than zero from the bottom.
[TABLE="width: 66"]
<colgroup><col width="66" style="width: 66pt;"></colgroup><tbody>[TR]
[TD="class: xl63, width: 66, bgcolor: [URL=https://www.mrexcel.com/forum/usertag.php?do=list&action=hash&hash=963634]#963634[/URL] , align: center"]Weight[/TD]
[/TR]
[TR]
[TD="class: xl64"] [/TD]
[/TR]
[TR]
[TD="class: xl65, align: right"]189.0[/TD]
[/TR]
[TR]
[TD="class: xl65"] [/TD]
[/TR]
[TR]
[TD="class: xl65, align: right"]187.0[/TD]
[/TR]
[TR]
[TD="class: xl65, align: right"]188.0[/TD]
[/TR]
[TR]
[TD="class: xl65, align: right"]185.0[/TD]
[/TR]
[TR]
[TD="class: xl65, align: right"]184.0[/TD]
[/TR]
[TR]
[TD="class: xl65, align: right"]183.0[/TD]
[/TR]
[TR]
[TD="class: xl65, align: right"]184.0[/TD]
[/TR]
[TR]
[TD="class: xl65"] [/TD]
[/TR]
[TR]
[TD="class: xl65, align: right"]180.0[/TD]
[/TR]
[TR]
[TD="class: xl65"] [/TD]
[/TR]
[TR]
[TD="class: xl65"] [/TD]
[/TR]
[TR]
[TD="class: xl65"] [/TD]
[/TR]
[TR]
[TD="class: xl65"] [/TD]
[/TR]
[TR]
[TD="class: xl65"] [/TD]
[/TR]
[TR]
[TD="class: xl65"] [/TD]
[/TR]
</tbody>[/TABLE]
 
Upvote 0
Try


Excel 2013/2016
BC
5Weight184
6
7189
8
9187
10188
11185
12184
13183
14184
15
16180
Sheet3
Cell Formulas
RangeFormula
C5{=INDEX(B6:B42,LARGE(IF(B6:B42<>"",ROW(B6:B42)-ROW(B6)+1),2))}
Press CTRL+SHIFT+ENTER to enter array formulas.
 
Upvote 0
Hi,

I like the INDEX formula above better, just throwing this in for fun.

Normally entered:


Book1
BC
5Weight
6184
7189
8
9187
10
11
12188
13185
14184
15
16183
17184
18
19
20
21
22180
23
Sheet473
Cell Formulas
RangeFormula
C6=LOOKUP(2,1/INDIRECT("B6:B"&LOOKUP(2,1/B6:B42,ROW(B6:B42))-1),B6:B42)
 
Last edited:
Upvote 0
Thanks to Fluff and jtakw, both works exactly as I need. Once again this forum comes through. As I said before, this forum is the best for expertise help.
 
Upvote 0

Forum statistics

Threads
1,224,823
Messages
6,181,178
Members
453,021
Latest member
Justyna P

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