Solved

Excel: find number farthest from 0

Posted on 2011-09-02
5
367 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 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

SharePoint Admin?

Enable Your Employees To Focus On The Core With Intuitive Onscreen Guidance That is With You At The Moment of Need.

Question has a verified solution.

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

This article descibes how to create a connection between Excel and SAP and how to move data from Excel to SAP or the other way around.
After seeing numerous questions for Dynamic Data Validation I notice that most have used Visual Basic to solve the problem. This suggestion is purely formula based and can be used in multiple rows.
The viewer will learn how to use a discrete random variable to simulate the return on an investment over a period of years, create a Monte Carlo simulation using the discrete random variable, and create a graph to represent the possible returns over…
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…

635 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