ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Worksheet Functions (https://www.excelbanter.com/excel-worksheet-functions/)
-   -   More elegant method? (https://www.excelbanter.com/excel-worksheet-functions/65006-re-more-elegant-method.html)

Biff

More elegant method?
 
Hi!

Maybe this:

=LOOKUP(2,1/(A1:A15<0),A1:A15)

10
22
44
0
0
0


The above formula will return 44.

10
22
44
0
17
0

The above formula will return 17.

Biff

"RoR" wrote in message
...
For each month a number is entered, until it is entered the value for each
month is zero.
I am trying to pull the latest number greater than zero from the list.

Currently I use two nested IF arguments such as:
IF(jan0, jan, if(feb0, feb, (if mar0, mar, etc. I'm using two to
avoid the limit of
nesting logical arguments within logical arguments to 7.

Each result reports to a cell with its result, I then do a similar
calculation to get the
number I really need.

Clumsy, but effective. I, however, need a method to get the latest number
without using
the extra cells, and would like to get it in a more elegant manner. Any
suggestions?

It's been a very long time since I've written spreadsheets (early 1-2-3,
and visicalc,
yeah, that long) and I feel that there must be something I'm missing.

Thanks in advance.





--
Rick R
ult
replace default with com to email





All times are GMT +1. The time now is 10:04 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com