Brad Rogers wrote:
Hello All,

I'm trying to get text printed in a cell in Calc based on the values
found in other cells, as follows;

     Col1 Col2

Row1 Cat    2
Row2 Dog    4
Row3 Mouse  3

The text I want to output to the result cell is from Col1, based on the
values in Col2.  Specifically, the lowest value.  SO, in this instance,
I'd like "Cat" as the o/p.

Finding the MIN value is easy but after that, I'm stuck.  I've tried
googling, but don't seem able to invoke the right incantations.

Any help will be appreciated, thanks.


Hi,
For the given order of columns and _ascending ordered_ lookup vector in B:
Cat     2
Mouse   3
Dog     4

=INDEX($A$1:$A$3;MATCH(X1;$B$1:$B$3))
where X1 is _any_ number greater than or equal to 2.
In an ordered scale MATCH, VLOOKUP, HLOOKUP and LOOKUP match the first value being is greater or equal to the search value.

=INDEX({"A";"B";"C";"D"};MATCH( 2.5 ;{0;1;2;3})) ==> C
2.5 falls into category C.

If the scale is not in ascending order, the match point may not reflect better subsequent matches.

Greetings,
Andreas


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to