Solved

Excel: find number farthest from 0

Posted on 2011-09-02
5
359 Views
Last Modified: 2012-05-12
Hi,

I have a row of numbers in Excel, such as

       -2, -4, 0, 1 3

I need to return the value that is the farthest from 0.  In this example, -4

how?

thanks
0
Comment
Question by:caherciveen
  • 2
  • 2
5 Comments
 
LVL 18

Expert Comment

by:Cluskitt
ID: 36473951
Something like:
=MAX(ABS(A1:A10))
0
 

Author Comment

by:caherciveen
ID: 36473961
That returns 4, not -4
0
 
LVL 50

Expert Comment

by:barry houdini
ID: 36473984
Try this

=IF(MAX(A1:A10)>MIN(A1:A10)*-1,MAX(A1,A10),MIN(A1:A10))

regards, barry
0
 
LVL 50

Accepted Solution

by:
barry houdini earned 500 total points
ID: 36473999
Sorry there's a typo in that - should be this version

=IF(MAX(A1:A10)>=MIN(A1:A10)*-1,MAX(A1:A10),MIN(A1:A10))

If you have 4 and -4 in the dataset then it will return the positive number

barry
0
 

Author Comment

by:caherciveen
ID: 36474015
ah, ok, cool
0

Featured Post

Free Tool: Site Down Detector

Helpful to verify reports of your own downtime, or to double check a downed website you are trying to access.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

A little background as to how I came to I design this code: Around 5 years ago I designed an add-in that formatted Excel files to a corporate standard, applying different cell colours and font type depending on whether the cells contained inputs,…
INDEX and MATCH can be used to great effect to replace HLOOKUP and VLOOKUP as it does not have the limitation of needing the data to be sorted so that the reference value is in the first column or row. It also has the ability to perform a bi-directi…
This Micro Tutorial will demonstrate on a Mac how to change the sort order for chart legend values and decrpyt the intimidating chart menu.
Many functions in Excel can make decisions. The most simple of these is the IF function: it returns a value depending on whether a condition you describe is true or false. Once you get the hang of using the IF function, you will find it easier to us…

828 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question