View Single Post
  #2   Report Post  
tjtjjtjt
 
Posts: n/a
Default

If your first column of data is in A3:A10, and your second column in B3:B10,
I think this should do it.
=VLOOKUP((MIN(IF((A3:A100)*(A3:A10),(A3:A10)))),A 3:B10,2,0)

This is an array formula and must be entered by pressing Ctrl+Shift+Enter.

This formula will return #N/A if all the values are negative. The formula
below should prevent the error. It's also an array formula.

=IF(ISNA(VLOOKUP((MIN(IF((A3:A100)*(A3:A10),(A3:A 10)))),A3:B10,2,0)),"All
values are
negative.",VLOOKUP((MIN(IF((A3:A100)*(A3:A10),(A3 :A10)))),A3:B10,2,0))
--
tj


"TheRobsterUK" wrote:


Hi,

Suppose I have a worksheet with the following data:

(column1)......... (column2)
Savings..................I.D.
-243...................... 01
-205...................... 02
-165.......................03
-87.........................04
57..........................05
109........................06
205........................07
303........................08

What I need to do is look up the smallest -positive- number in the
"Savings" column and the look over to the "I.D." column and retrieve
the corresponding I.D.

So in the above example, look up the value 57 and then retrieve the
corresponding I.D. of 05.

Is there a way to do this? I would have thought an array formula of
some kind but I haven't met with any success so far. In my actual
spreadsheet I have over 10,000 entries in the "Savings" column so any
formula would need to be efficient.

Thanks in advance
-Rob


--
TheRobsterUK


------------------------------------------------------------------------
TheRobsterUK's Profile: http://www.excelforum.com/member.php...fo&userid=9924
View this thread: http://www.excelforum.com/showthread...hreadid=470975