Solved

Excel: find number farthest from 0

Posted on 2011-09-02
5
353 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

Why You Should Analyze Threat Actor TTPs

After years of analyzing threat actor behavior, it’s become clear that at any given time there are specific tactics, techniques, and procedures (TTPs) that are particularly prevalent. By analyzing and understanding these TTPs, you can dramatically enhance your security program.

Join & Write a Comment

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,…
Drop Down List with Unique/Distinct Values (Part II - ComboBox or ListBox and Data Validation List Bonus!) David Miller (dlmille) Intro This article focuses on delivering unique, sorted lists to list objects (e.g., ComboBox, ListBox) and Dat…
This Micro Tutorial will demonstrate in Microsoft Excel how to add style and sexy appeal to horizontal bar charts.
Excel styles will make formatting consistent and let you apply and change formatting faster. In this tutorial, you'll learn how to use Excel's built-in styles, how to modify styles, and how to create your own. You'll also learn how to use your custo…

707 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

Need Help in Real-Time?

Connect with top rated Experts

14 Experts available now in Live!

Get 1:1 Help Now