Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 3
Default Find number closest to 0

I want to find the number in a column that is closest to 0 (number may be
positive or negative) and return a number in an adjacent cell, if no number
in the adjacent cell I want the next number that is closest to 0 that does
have a number in the adjacent cell.
eg.
offset chainage
-88.972
-2.174
22.693 215.459
24.099 231.342
93.596 355.034

I want 215.459 to be returned.


  #2   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 5,651
Default Find number closest to 0

On Thu, 16 Oct 2008 17:03:07 -0700, snappertime
wrote:

I want to find the number in a column that is closest to 0 (number may be
positive or negative) and return a number in an adjacent cell, if no number
in the adjacent cell I want the next number that is closest to 0 that does
have a number in the adjacent cell.
eg.
offset chainage
-88.972
-2.174
22.693 215.459
24.099 231.342
93.596 355.034

I want 215.459 to be returned.


Enter this as an **array** formula:

=INDEX(chainage,MATCH(MIN(IF(ISNUMBER(chainage),of fset)),offset,0))

To enter an **array** formula, hold down <ctrl<shift while hitting <enter.
If you do it correctly, Excel will place braces {...} around the formula.
--ron
  #3   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 3
Default Find number closest to 0

Thanks mate that works

"Ron Rosenfeld" wrote:

On Thu, 16 Oct 2008 17:03:07 -0700, snappertime
wrote:

I want to find the number in a column that is closest to 0 (number may be
positive or negative) and return a number in an adjacent cell, if no number
in the adjacent cell I want the next number that is closest to 0 that does
have a number in the adjacent cell.
eg.
offset chainage
-88.972
-2.174
22.693 215.459
24.099 231.342
93.596 355.034

I want 215.459 to be returned.


Enter this as an **array** formula:

=INDEX(chainage,MATCH(MIN(IF(ISNUMBER(chainage),of fset)),offset,0))

To enter an **array** formula, hold down <ctrl<shift while hitting <enter.
If you do it correctly, Excel will place braces {...} around the formula.
--ron

  #4   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 5,651
Default Find number closest to 0

On Thu, 16 Oct 2008 18:26:01 -0700, snappertime
wrote:

Thanks mate that works

"Ron Rosenfeld" wrote:

On Thu, 16 Oct 2008 17:03:07 -0700, snappertime
wrote:

I want to find the number in a column that is closest to 0 (number may be
positive or negative) and return a number in an adjacent cell, if no number
in the adjacent cell I want the next number that is closest to 0 that does
have a number in the adjacent cell.
eg.
offset chainage
-88.972
-2.174
22.693 215.459
24.099 231.342
93.596 355.034

I want 215.459 to be returned.


Enter this as an **array** formula:

=INDEX(chainage,MATCH(MIN(IF(ISNUMBER(chainage),of fset)),offset,0))

To enter an **array** formula, hold down <ctrl<shift while hitting <enter.
If you do it correctly, Excel will place braces {...} around the formula.
--ron


You're welcome. Glad to help.
Thanks for the feedback.
--ron
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 closest match and return next highest number in range x6v87qe Excel Discussion (Misc queries) 4 June 18th 08 02:58 PM
Array Lookup to Find Closest Date and Next Closest Date [email protected] Excel Worksheet Functions 7 November 7th 07 04:04 AM
How can I match a random number with closest number from sequence? Matt Excel Worksheet Functions 4 August 3rd 06 02:22 AM
Find the closest match to a reference number in a row of unsorted Nick Krill Excel Worksheet Functions 3 January 1st 06 09:33 PM
find closest match to a reference number in a row of numbers Nick Krill Excel Discussion (Misc queries) 4 December 21st 05 12:59 PM


All times are GMT +1. The time now is 08:05 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"