Share via

Exclude cell from an array

Anonymous
2019-01-28T22:22:45+00:00

Hi,

I am having some trouble with a calculation. I appreciate all the help.

The issue is regarding calculation of Quartile or Percentile of an array excluding one value.

For example, I have 100 random values between 0 and 1; =RAND(), in A1:A100. What I'd like to do is calculate first quartile in B1 of array A1:A100 excluding cell A1 and then have the ability to drag down all the way to B100. So, in B25, I would like the value of first quartile of array A1:A100 excluding cell A25.

That way, I will end up with 100 first quartile values and each value will have a unique cell excluded from the sample. Averaging the 100 values will provide me with a non-biased first quartile.

Cheers,

H

Microsoft 365 and Office | Excel | For home | Windows

Locked Question. This question was migrated from the Microsoft Support Community. You can vote on whether it's helpful, but you can't add comments or replies or follow the question.

0 comments No comments

Answer accepted by question author

Lz365 38,201 Reputation points Volunteer Moderator
2019-01-30T10:15:02+00:00

Hi

Example with A1:A20 and a duplicate (my dec. separator is the comma):

in B1:

=AGGREGATE(17,6,1/(ROW(A$1:A$20)<>ROW(A1))*(A$1:A$20),1)

The above formula only exclude the value in column A on the same row. So, when in B7 the 0.550135 in A7 is excluded but not its duplicate in A10

If you want to exclude the duplicates the formula is less complex:

=AGGREGATE(17,6,1/(A$1:A$20<>A1)*A$1:A$20,1)

Was this answer helpful?

1 person found this answer helpful.
0 comments No comments

5 additional answers

Sort by: Most helpful
  1. Anonymous
    2019-02-08T05:01:28+00:00

    Thank you so much, Lz! This is perfect and worked like a charm.

    Cheers

    Was this answer helpful?

    0 comments No comments
  2. Deleted

    This answer has been deleted due to a violation of our Code of Conduct. The answer was manually reported or identified through automated detection before action was taken. Please refer to our Code of Conduct for more information.


    Comments have been turned off. Learn more

  3. Deleted

    This answer has been deleted due to a violation of our Code of Conduct. The answer was manually reported or identified through automated detection before action was taken. Please refer to our Code of Conduct for more information.


    Comments have been turned off. Learn more

  4. Lz365 38,201 Reputation points Volunteer Moderator
    2019-02-05T16:06:33+00:00

    Hi H

    Have you checked the above proposals. Does one do what you want?

    Was this answer helpful?

    0 comments No comments