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

Copy formula down without changing references
If you have =SUM(F2:F49) in F50; type Alt+' in F51 to copy =SUM(F2:F49) to F51, leaving the formula in edit mode. Change SUM to COUNT.
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.
Weight
189.0
187.0
188.0
185.0
184.0
183.0
184.0
180.0

<colgroup><col width="66" style="width: 66pt;"></colgroup><tbody>
</tbody>
 
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
You're welcome, glad to help.
 
Upvote 0

Forum statistics

Threads
1,214,822
Messages
6,121,772
Members
449,049
Latest member
greyangel23

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