LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #4   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!

Try this:

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

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

Again, if the value in J5 = the max value in column A you'll get an #N/A
error. Also, if the value in J5 < min value in column A you'll get the min
value.

We could make this more robust if you were to tell me the limits of the user
entered value of J5. For example, is 0.49 a value that can be entered in J5?
If so, in the table there is a value 0.49 but there is no value < 0.49.
Same with 3.0. there is a value < than 3.0 but there is no value 3.0.

Biff

"reefguy" wrote in
message ...

Thanks!

It work perfect... One more question; *in the same table*, what
function I need in the cell K4 to get the number that is below the
number that I got in cell K5

For example the user types 1.75 then I got 2.0000 in the cell K5
(thanks Biff) ... how do I get 1.5000 in the cell K4? I tried to change
"" for "<" in the formula but I got always 0.0030 in the cell K4.

Thanks


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



 
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On



All times are GMT +1. The time now is 09:48 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"