Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.worksheet.functions
Nick Krill
 
Posts: n/a
Default Find the closest match to a reference number in a row of unsorted

Data is random in nature and unsorted. Generally between 10 and 100, two
decimal precision (see below). How do I find the position of the entry
closest a given value, say 45.11

45.54 45.56 45.32 45.5 45.42 45.35 45.46 45.4 44.97 45 45.05

  #2   Report Post  
Posted to microsoft.public.excel.worksheet.functions
Niek Otten
 
Posts: n/a
Default Find the closest match to a reference number in a row of unsorted

With your data in A1:K1:

=MATCH(MIN(A1:K1-45.11),A1:K1-45.11,0)

Array-entered, which means commit with CTRL+SHIFT+ENTER instead of just with
ENTER

In the formula bar, the formula will appear in curly brackets, to prove it
is an array formula

--
Kind regards,

Niek Otten

"Nick Krill" wrote in message
...
Data is random in nature and unsorted. Generally between 10 and 100, two
decimal precision (see below). How do I find the position of the entry
closest a given value, say 45.11

45.54 45.56 45.32 45.5 45.42 45.35 45.46 45.4 44.97 45 45.05



  #4   Report Post  
Posted to microsoft.public.excel.worksheet.functions
Niek Otten
 
Posts: n/a
Default Find the closest match to a reference number in a row of unsorted

Absolutely right, Sandy!

Thanks for the correction.

--
Kind regards,

Niek Otten

"Sandy Mann" wrote in message
...
Neik,

Your formula returns the position of the lowest number for me even if one
of the given numbers is 45.11. Should the range subtractions not be
enclosed in ABS() functions as in:

=MATCH(MIN(ABS(A1:K1-45.11)),ABS(A1:K1-45.11),0)


--
Regards

Sandy

with @tiscali.co.uk


"Niek Otten" wrote in message
...
With your data in A1:K1:

=MATCH(MIN(A1:K1-45.11),A1:K1-45.11,0)

Array-entered, which means commit with CTRL+SHIFT+ENTER instead of just
with ENTER

In the formula bar, the formula will appear in curly brackets, to prove
it is an array formula

--
Kind regards,

Niek Otten

"Nick Krill" wrote in message
...
Data is random in nature and unsorted. Generally between 10 and 100, two
decimal precision (see below). How do I find the position of the entry
closest a given value, say 45.11

45.54 45.56 45.32 45.5 45.42 45.35 45.46 45.4 44.97 45 45.05







Reply
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


Similar Threads
Thread Thread Starter Forum Replies Last Post
Find and match totals Genius Req. this should be easier to read James Excel Worksheet Functions 1 October 3rd 05 10:12 PM
Match Closest Results from Data Array TheRobsterUK Excel Discussion (Misc queries) 2 September 29th 05 01:48 PM
Match two tables using unique ID number fisherman Excel Discussion (Misc queries) 1 August 18th 05 02:36 AM
Match function...random search? Les Excel Worksheet Functions 10 July 28th 05 11:54 AM
Find all cells with a number and mulitply Jim Excel Discussion (Misc queries) 3 January 21st 05 02:28 PM


All times are GMT +1. The time now is 04:09 PM.

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

About Us

"It's about Microsoft Excel"