Determing Range Criteria

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

I have a series of numbers. For all intents an purposes the range is
-infinity to +infinity. All values are integers, and there may be
multiples... Example, there may be a quantity of 40 with a value of "15".
The numbers are in random order and cannot be sorted.

Determining the min/max is easy: =Min(A1:A65000) and Max(A1:A65000).

I want to determine the largest negative value and the smallest positive
value. I don't care about its position or frequency of occurence, only the
value is important to me.

Do I need to write my own function in VBA or is there something easy I am
missing?
 
try this idea using this ARRAY formula which must be entered using
ctrl+shift+enter. Also suggest NOT using 65000. Use something less

=MAX(IF(A1:A100<0,A1:A100))
 
Half way there. That works to find the largest negative value.
I tried the ARRAY formula
=MIN(IF(A1:A100>0,A1:A100))
Using this formula provides the same value as =MIN(A1:A100)

No joy. Any other ideas? I need the smallest positive non-zero integer
value. I'm using E2007 if that adds to the joy.

PS the magic number in Excel2003 is 65,536 rows. In Excel2007 it is
2^20=1048576



--
If this post was helpful, please consider rating it.

Jim

Visit http://project.mvps.org/ for FAQs and more information
about Microsoft Project
 
Are you sure you used that as an *array* formula? For me it does the job.
It excludes the negative numbers and gives me the smallest +ve one.
 
It will if there are no zero values. But with zeroes, that formula extracts
them and gives the MIN of the rest.

--
---
HTH

Bob

(there's no email, no snail mail, but somewhere should be gmail in my addy)
 
To confirm an array formula - I type the formula as normal, hit enter.
Then reselect the cell and hit CTL+SHIFT+ENTER.
This works fine on the first formula, it also encloses it in { }
However, then I do it the second time with the =MIN(IF(A1:A100>0,A1:A100)) I
do not get the added {} after pressing CTL+SHFT+ENTER.

Any other ideas? I am sure it is something simple that I am overlooking.
--
If this post was helpful, please consider rating it.

Jim

Visit http://project.mvps.org/ for FAQs and more information
about Microsoft Project
 
All values are integers

it might be that you mean the largest *absolute* value among the group of
negative integers...

then try this array formula.

{=MAX(IF(A1:A100<0,ABS(A1:A100)))}
 
god bless

Mankind said:
it might be that you mean the largest *absolute* value among the group of
negative integers...

then try this array formula.

{=MAX(IF(A1:A100<0,ABS(A1:A100)))}
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top