View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.worksheet.functions
Toppers Toppers is offline
external usenet poster
 
Posts: 4,339
Default How to determine the values from a list?

By 50% I have interpretted that as 50% in the middle of the range i.e ignore
top/bottom (lowest/highest) 25%, based on your example.

With data in column A starting row 1:

B1:
=MIN(OFFSET($A$1,INT(COUNTA(A:A)/4)+1,0,INT(COUNTA(A:A)/2)))

B2:
=MAX(OFFSET($A$1,INT(COUNTA(A:A)/4)+1,0,INT(COUNTA(A:A)/2)))

You might want to adjust for list of even/odd number length.

B1=40 in your example, not 41

HTH

"Eric" wrote:

Re-post the question

Does anyone have any idea on how to determine the values under following
conditions?

Given a list of numbers sorted by ascending order from top to bottom under
column A, I would like to determine the minimum difference on the range
within this list covering 50% of total numbers, and return the smallest
number within the range in cell B1 and the largest number within the range in
cell B2.

For example, if the list contains 10 numbers, then I need to select 5 numbers
covering the minimum range, such as following example with 10 numbers, and I
need to select 50% of 10 = 5 numbers covering minimum ranges.

1,3,21,40,41,42,43,44,88,99

In this case, I should select 40,41,42,43,44
41 returns in cell B1
44 returns in cell B2

Does anyone have any suggestions?
Thank you in advance
Eric