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

How can I find the closest match larger( or smaller) than a reference value
in a row of unsorted data
  #2   Report Post  
Posted to microsoft.public.excel.misc
Biff
 
Posts: n/a
Default find closest match to a reference number in a row of numbers

Hi!

Try this:

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

A5 = lookup_value

=INDEX(A1:J1,MATCH(MIN(ABS(A1:J1-A5)),ABS(A1:J1-A5),0))

Biff

"Nick Krill" <Nick wrote in message
...
How can I find the closest match larger( or smaller) than a reference
value
in a row of unsorted data



  #3   Report Post  
Posted to microsoft.public.excel.misc
JMay
 
Posts: n/a
Default find closest match to a reference number in a row of numbers

Biff:

This is very nice. Can you explain or interpret how the formula is treating or
bringing back the both the match(row) and the match(column) arguments of the
index function?

Confused here...
TIA,,

"Biff" wrote in message
...
Hi!

Try this:

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

A5 = lookup_value

=INDEX(A1:J1,MATCH(MIN(ABS(A1:J1-A5)),ABS(A1:J1-A5),0))

Biff

"Nick Krill" <Nick wrote in message
...
How can I find the closest match larger( or smaller) than a reference value
in a row of unsorted data





  #4   Report Post  
Posted to microsoft.public.excel.misc
Biff
 
Posts: n/a
Default find closest match to a reference number in a row of numbers

Hi!

It's only referencing a single (row) array so there is no column argument.

Simply determine the minimum deviation from the lookup_value. Since the OP
stated that it could be either above or below the lookup_value we have to
use the ABS function so that negative deviations are made equal to positive
deviations.

Biff

"JMay" wrote in message
news:hnSpf.61035$WH.17922@dukeread01...
Biff:

This is very nice. Can you explain or interpret how the formula is
treating or bringing back the both the match(row) and the match(column)
arguments of the index function?

Confused here...
TIA,,

"Biff" wrote in message
...
Hi!

Try this:

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

A5 = lookup_value

=INDEX(A1:J1,MATCH(MIN(ABS(A1:J1-A5)),ABS(A1:J1-A5),0))

Biff

"Nick Krill" <Nick wrote in message
...
How can I find the closest match larger( or smaller) than a reference
value
in a row of unsorted data







  #5   Report Post  
Posted to microsoft.public.excel.misc
Jim May
 
Posts: n/a
Default find closest match to a reference number in a row of numbers

Thanks for the clarification Biff;
Jim

"Biff" wrote:

Hi!

It's only referencing a single (row) array so there is no column argument.

Simply determine the minimum deviation from the lookup_value. Since the OP
stated that it could be either above or below the lookup_value we have to
use the ABS function so that negative deviations are made equal to positive
deviations.

Biff

"JMay" wrote in message
news:hnSpf.61035$WH.17922@dukeread01...
Biff:

This is very nice. Can you explain or interpret how the formula is
treating or bringing back the both the match(row) and the match(column)
arguments of the index function?

Confused here...
TIA,,

"Biff" wrote in message
...
Hi!

Try this:

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

A5 = lookup_value

=INDEX(A1:J1,MATCH(MIN(ABS(A1:J1-A5)),ABS(A1:J1-A5),0))

Biff

"Nick Krill" <Nick wrote in message
...
How can I find the closest match larger( or smaller) than a reference
value
in a row of unsorted data









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
Seed numbers for random number generation, uniform distribution darebo Excel Discussion (Misc queries) 3 April 21st 23 09:02 PM
Find similar numbers from two columns of numbers Dennis Andrews Excel Discussion (Misc queries) 1 November 30th 05 07:54 AM
Match Closest Results from Data Array TheRobsterUK Excel Discussion (Misc queries) 2 September 29th 05 01:48 PM
How can I compare a number against a list of numbers johnny Excel Worksheet Functions 4 March 22nd 05 07:13 PM
two columns of numbers, need to sort/filter to find one number th. Larry in Seattle Excel Discussion (Misc queries) 1 December 10th 04 06:17 AM


All times are GMT +1. The time now is 01:57 PM.

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"