Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How can I calculate deciles with a range of 12,000 cells in excel?

Tags:

sorting

excel

vba

I have a column of 12,000+ numbers, both positive and negative, sorted from highest to lowest in an Excel spreadsheet.

Is there an easy way to go about dividing this range into deciles?

like image 526
Andy Avatar asked Sep 30 '11 15:09

Andy


People also ask

How do you calculate decile range?

These are given as follows: Decile Formula for ungrouped data: D(x) = Value of the x(n+1)10 x ( n + 1 ) 10 th term in the data set. x is the value of the decile that needs to be calculated and ranges from 1 to 9. n is the total number of observations in that data set.

How many deciles are in a set of data?

A decile is a quantitative method of splitting up a set of ranked data into 10 equally large subsections. This type of data ranking is performed as part of many academic and statistical studies in the finance and economics fields.


1 Answers

This may not be the most efficient solution, but you might try the following:

  1. Assuming your numbers are in cells A1 through A12000, enter the following formula in cell B1 =PERCENTRANK($A$1:$A$12000,A1,1). This calculates the percent rank, with the set of values in cells $A$1:$A$12000, of the value in cell A1, rounded down to 1 decimal place (which is all you need to identify the decile).

  2. Copy the formula in cell B1 to cells B2 through B12000.

  3. Use the values in column B to identify the decile for the corresponding value in column A. 0 identifies values greater than or equal to the 0th percentile and less than the 10th percentile, 0.1 identifies values greater than or equal to the 10th percentile and less than the 20th percentile, and so on. Depending on the size of your set and whether or not there are duplicates, there may or may not be a value that gets assigned a PERCENTRANK of exactly 1.

If you are using Excel 2010, you might, depending on your needs, consider using the new functions PERCENTRANK.INC and PERCENTRANK.EXC that are supposed to supercede PERCENTRANK.

Hope this helps.

like image 125
Brian Camire Avatar answered Sep 23 '22 22:09

Brian Camire