calc: index column A with column B

    I want to find the row in column A that corresponds to the row of a

value in column B.

    eg.

    row A B
    1 10 220000
    2 20 150000
    3 30 3000
    4 40 10

    =some_function('A',minimum_function(B));

    where minimum_function(B) returns 4 and some_function('A',4) returns the

value in column A at row 4.

I asked the previous and someone gave me the formula:

=INDIRECT("$A"&MATCH(MIN(B:B);B:B;0))

It worked fine but now I have some rows with zeros (more than one row):
row A B
1 10 220000
2 20 150000
3 30 3000
4 40 10
5 50 0
6 60 0

Is there a MINBUTGREATERTHANZERO function?

James,

Since a MINIF function does not exist you can use MINIFS.

Change MIN(B:B) to MINIFS(B:B;B:B;">0”)

Success,
Rob

Another problem.

Some of the numbers display as 0 but are calculated so have fractions like

0.0000000812344372353
I want to find the last row that displays as non-zero.

Then use >0.0000001 or whatever value works instead of >0

column B
Copies to: users@global.libreoffice.org
Date sent: Fri, 29 Jan 2021 14:06:08 -0500

Another problem.

Some of the numbers display as 0 but are calculated so have fractions like

0.0000000812344372353
I want to find the last row that displays as non-zero.

One way to solve it is to round all involved cell values, if all the extra
decimals are not necessary. Depending on what your formulas look like, you
can probably wrap an ROUND() around each one of them. For instance
=ROUND(MyBigAndComplicatedFormula;5)

There's also a (global) setting to make all cell values exactly as they are
viewed, but that would affect all your spreadsheets, I guess. In many cases
you probably don't want that.

Kind regards

Johnny Rosenberg

James,
There are 2 basic ways to accomplish this:

Round the values at calculation time, so they’ll become real 0’s

Change the formula to MINIFS(B:B;B:B;">=1”)

Success,
Rob