Lookup the last value in a column that is larger than 0

Asaflahav1

New Member
Joined
Sep 16, 2011
Messages
2
Hi guys,

I was looking for a solution for this for a long time now, and didn't noticed it in the forums, maybe you can be an assistance:

what I'm trying to do is to lookup a certin column last value that is larger than 0. for example, if I'm trying to search this column:

A1 4
A2 5
A3 0
A4 2
A5 0

I would like to receive the value "2".
Now, I've tried to think of a combination of an "LOOKUP(9.99999e+10,307)" function with an "IF(">0") array function, but couldn't come up with anything.

Now, I prefer not using VBA on this one, and I can't just replace the zeros in the columns with "".
Any suggestions?
 

Excel Facts

Round to nearest half hour?
Use =MROUND(A2,"0:30") to round to nearest half hour. Use =CEILING(A2,"0:30") to round to next half hour.
Hi Asaflahav1

To do this add a column in front of A1

Then add this formula and fill down the list. at the bottom of the list eg in cell A6 add false
Code:
=IF(A2="","",IF(AND(A2=FALSE,B1>0),TRUE,IF(A2=TRUE,"",FALSE)))

then use a vlookup like
Code:
=VLOOKUP(TRUE,A1:B5,2,FALSE)

Thanks
Tigs
 
Upvote 0
Hi guys,

I was looking for a solution for this for a long time now, and didn't noticed it in the forums, maybe you can be an assistance:

what I'm trying to do is to lookup a certin column last value that is larger than 0. for example, if I'm trying to search this column:

A1 4
A2 5
A3 0
A4 2
A5 0

I would like to receive the value "2".
Now, I've tried to think of a combination of an "LOOKUP(9.99999e+10,307)" function with an "IF(">0") array function, but couldn't come up with anything.

Now, I prefer not using VBA on this one, and I can't just replace the zeros in the columns with "".
Any suggestions?

Try...

=LOOKUP(9.99999999999999E+307,1/A1:A5,A1:A5)
 
Upvote 0

Forum statistics

Threads
1,224,598
Messages
6,179,823
Members
452,946
Latest member
JoseDavid

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