Mike Scott wrote:
That's not quite what the help file suggests; at least for vlookup() you can specify whether the list is sorted or not - if sorted, it returns an appropriately close match, if unsorted, you get an exact match or an error.


From Brad's initial request I was unsure what what he actually wants.

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.

Brad,
In which instance you'd like to get the lowest value?

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.

This is why I believe that Brad does not want the exact match. The "normal" lookup gets the smallest value being greater or equal to the search value.

But now I'm beginning to understand that he wants
=VLOOKUP(MIN(pts);range;2;0)
or with the given column order:
=INDEX(animals;MATCH(MIN(pts);pts;0)

Spreadsheet lookups can not match more than one position. If there happens to be another animal with 2 points below the Cat, you will see the Cat only.


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscr...@openoffice.org
For additional commands, e-mail: users-h...@openoffice.org

Reply via email to