View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.worksheet.functions
Biff
 
Posts: n/a
Default Finding the closest number in column A and take the value in column B

Hi!

Here's one way:

Assume the table is in the range A1:B7.

Entered as an array using the key combo of CTRL,SHIFT,ENTER:

=IF(ISNUMBER(J5),INDEX(B1:B7,MATCH(TRUE,A1:A7J5,0 )),"")

If the value emtered in J5 is = the max value in column A you'll get an
#N/A! error.

Biff

"reefguy" wrote in
message ...

hi guys!

I've been trying to do the next without success. i'm desperate!

The user type a number in cell J5 ... The function has to look for the
closest larger value in column A then it takes the value that is in the
same row but in the column B and copy this value in the cell K5.

The table is:

0.5000 0.0030
0.6660 0.0085
1.0000 0.0220
1.5000 0.0420
2.0000 0.0560
2.5000 0.0630
3.0000 0.0670

the user type for example 1.25 in cell J5 and the function gets 0.0420
in K5

Thanks for your help.


--
reefguy
------------------------------------------------------------------------
reefguy's Profile:
http://www.excelforum.com/member.php...fo&userid=8282
View this thread: http://www.excelforum.com/showthread...hreadid=539167