Divide Numbers into Deciles

Bobaree

New Member
Joined
Aug 13, 2014
Messages
41
Column D contains decimal numbers which are the summation of 6 other columns. (The 6 other columns are percent rank calculations.) Does anyone know how to divide the numbers in column D into deciles and show the results in column C?

I found the information below which looks like it would do the trick, but I don't know how to incorporate it into my project. In addition to not knowing how to incorporate the code, I have reservations about using it since the results in column D are already percentranks. In other words, I'm not sure about applying the percentrank formula against those numbers that are already percentranks.

Can anyone help? I will be glad to post my current spreadsheet if that will help.


This is the information I found:
I have written a user defined function that will look down a range and calculate which decilerank for a number within the range sits.<o:p></o:p>
Copy the code to a module in your spreadsheet and call it as you normally would a function.<o:p></o:p>
' This User Defined Function can be called to calculate which Decile a single cell
' falls within a larger range of cells<o:p></o:p>

Function PERCENTILE_TO_DECILE(DataRange, RefCell)<o:p></o:p>
'DECILE_RANK(The Range of data you are interested in, The data cell that you want to know the decile of)
'Declares the function that can be called in the spreadsheet cell - enter '=DECILE_RANK(A5:A50,A5)'
'to use regularly paste it to your PERSONAL.xls workbook and reference it via =PERSONAL.XLS!decile_rank(A5:A50,A5)<o:p></o:p>


'Remove quote on line below if you want to Automatically update the function when the worksheet is recalculated
'Application.Volatile True<o:p></o:p>

'Using the percentile worksheet function calculate where the 10th, 20th etc percentile of the reference range are<o:p></o:p>
DEC1 = Application.WorksheetFunction.Percentile(DataRange, 0.1)
DEC2 = Application.WorksheetFunction.Percentile(DataRange, 0.2)
DEC3 = Application.WorksheetFunction.Percentile(DataRange, 0.3)
DEC4 = Application.WorksheetFunction.Percentile(DataRange, 0.4)
DEC5 = Application.WorksheetFunction.Percentile(DataRange, 0.5)
DEC6 = Application.WorksheetFunction.Percentile(DataRange, 0.6)
DEC7 = Application.WorksheetFunction.Percentile(DataRange, 0.7)
DEC8 = Application.WorksheetFunction.Percentile(DataRange, 0.8)
DEC9 = Application.WorksheetFunction.Percentile(DataRange, 0.9)<o:p></o:p>


' Calculate the Decile rank that the reference cell value sits within<o:p></o:p>

If (RefCell <= DEC1) Then DECILE_RANK = 1
If (RefCell > DEC1) And (RefCell <= DEC2) Then DECILE_RANK = 2
If (RefCell > DEC2) And (RefCell <= DEC3) Then DECILE_RANK = 3
If (RefCell > DEC3) And (RefCell <= DEC4) Then DECILE_RANK = 4
If (RefCell > DEC4) And (RefCell <= DEC5) Then DECILE_RANK = 5
If (RefCell > DEC5) And (RefCell <= DEC6) Then DECILE_RANK = 6
If (RefCell > DEC6) And (RefCell <= DEC7) Then DECILE_RANK = 7
If (RefCell > DEC7) And (RefCell <= DEC8) Then DECILE_RANK = 8
If (RefCell > DEC8) And (RefCell <= DEC9) Then DECILE_RANK = 9
If (RefCell > DEC9) Then DECILE_RANK = 10<o:p></o:p>


'If you want to check that there is an empty cell value in the 'Ref Cell" reference cell then remove the quotes from the 6 lines below<o:p></o:p>

'ErrorSum = 0
'If Len(RefCell) = 0 Then ErrorSum = ErrorSum + 1
'For Each Cell In DataRange
'If Len(Cell) = 0 Then ErrorSum = ErrorSum + 1
'Next
'If ErrorSum > 0 Then MsgBox ("There is an empty cell in the lookup ranges for the decile function")<o:p></o:p>

End Function<o:p></o:p>
 

Excel Facts

Ambidextrous Undo
Undo last command with Ctrl+Z or Alt+Backspace. If you use the Undo icon in the QAT, open the drop-down arrow to undo up to 100 steps.
If column D was 100 cells from the first number to the last, I would expect 10 groups of 10 numbers each. If 200 cells, I would expect 10 groups with 20 numbers each, etc. There would be some variation since the number of cells would not normally fall into increments of 10 (i.e. 163 cells, etc.) I'm glad to see you again; Thanks for your interest.
 
Upvote 0
CompanyTickerDecileSumYieldPayout Ratio 12mPercentile P/BookPercentile P/EPSPercentile P/SalesPercentile EV/EBITDAPercentile P/CFPSShareholder YieldPrice/BookP/EPSP/SalesEV/EBITDAP/CFPSShrhld YldIndustry
AbbVie IncABBV1.084361.80.0210.3240.1320.1720.1320.30316.8821.34.5714.6250.92.70803 - Biotechnology & Drugs
Agilent Technologies Inc.A1.3470.9240.4050.0810.3140.2030.1020.2423.4128.12.7914.1288.22.41024 - Electronic Instruments & Controls
Allstate Corporation, TheALL4.6671.820.50.8890.8990.8590.7380.3840.8981.26120.767.8117.79.10715 - Insurance (Property & Casualty)
Aon PLCAON2.2141.218.80.4150.2930.4550.0810.2630.7073.3621.62.1817.6173.460712 - Insurance (Miscellaneous)
Apache CorporationAPA3.013127.40.910.2330.3440.970.3440.2121.1722.72.64.9134.92.30609 - Oil & Gas Operations
Apple Inc.AAPL2.6191.928.50.2130.6270.2230.6270.0510.8785.0416.43.429.6422.28.41003 - Communications Equipment
Applied Materials, Inc.AMAT1.7081.855.60.3640.0610.2830.1920.7680.043.631.23.1714.330.40.61033 - Semiconductors
AT&T Inc.T5.0425.353.40.7280.970.6770.960.8190.8881.9510.11.385.126.78.60915 - Communications Services
Automatic Data ProcessingADP1.5482.347.50.1520.1320.2630.3340.3240.3435.9826.83.2712.2141.53.10909 - Business Services
Baker Hughes IncorporatedBHI2.557120.80.7680.1920.6970.6270.0310.2421.6523.71.289.6756.42.40612 - Oil Well Services & Equipment
Bank of America CorpBAC2.841.26.20.990.1420.2730.0110.990.4340.76263.2533.33.60727 - Regional Banks
Bank of Nova Scotia (USA), TheBNS2.4873.646.10.7080.7880.1120.5760.1620.1412.0713.74.6610.1223.81.80727 - Regional Banks
Blackstone Group L.P., TheBX3.2845.352.90.4950.8790.3640.7280.7280.092.9212.42.558.535.21.40718 - Investment Services
Bristol-Myers Squibb CoBMY1.2942.987.10.1820.0610.0710.0510.7380.1915.4231.25.1321.334.12.10803 - Biotechnology & Drugs
Brookfield Asset Management InBAM3.2551.315.10.7780.920.6370.2130.6370.071.5911.21.491446.31.30718 - Investment Services
Canadian Imperial Bank of CommCM3.2363.949.40.6070.8090.2130.7080.3140.5852.4913.43.588.8142.94.60724 - Money Center Banks
Capital One Financial Corp.COF3.9811.516.20.920.930.3940.3640.8890.4841.0511.12.4511.822.83.90727 - Regional Banks
Cardinal Health IncCAH3.0821.936.50.3240.2930.970.4850.8390.1713.8921.60.2710.826.11.90803 - Biotechnology & Drugs
Caterpillar Inc.CAT3.5592.640.80.4550.5160.7280.4350.7080.7173.2217.91.2211.137.56.20206 - Construction & Agricultural Machinery
CBS CorporationCBS2.5371150.3340.3940.4050.3640.2530.7873.83202.4111.8177.97.40906 - Broadcasting & Cable TV
Chesapeake Energy CorporationCHK3.4881.344.30.8490.0410.8090.8290.910.051.334.70.876.722.20.70609 - Oil & Gas Operations
Citigroup IncC2.7090.11.30.990.5360.3840.0610.7180.020.7617.32.491837.40.30727 - Regional Banks
Cna Financial CorpCNA4.0322.666.20.970.940.7580.7180.3740.2720.7910.61.038.7123.42.50715 - Insurance (Property & Casualty)
Coca-Cola Company, TheKO1.739360.30.1920.2430.1720.1320.4750.5255.3223.9115.783.94.20506 - Beverages (Non-Alcoholic)
Colgate-Palmolive CompanyCL1.1432.257.90.0110.1220.2330.0910.1920.49433.28273.3917.2208.340521 - Personal & Household Products
ConocoPhillipsCOP4.1133.637.10.7380.8790.5660.930.6570.3431.7912.41.745.444.63.10609 - Oil & Gas Operations
Costco Wholesale CorporationCOST1.9221.228.50.2530.1120.940.3440.2430.034.5127.10.4912189.50.50963 - Retail (Specialty Non-Apparel)
CVS Caremark CorporationCVS3.2241.424.30.6270.4350.8890.3840.1420.7472.4219.40.711.6240.16.50954 - Retail (Drugs)
Delta Air Lines, Inc.DAL3.7390.91.90.5160.990.8090.7880.4550.1812.783.20.877.48621106 - Airline
Discover Financial ServicesDFS3.6891.516.50.5560.8890.1620.5360.8290.7172.6712.23.9510.626.56.20703 - Consumer Financial Services
Emerson Electric Co.EMR2.712.747.20.2730.5060.5460.5160.2130.6564.1818.11.8410.7195.85.11030 - Scientific & Technical Instruments
Estee Lauder Companies IncEL1.235125.10.1120.1620.3340.2630.1520.2127.5824.92.6613231.22.30521 - Personal & Household Products
Exxon Mobil CorporationXOM3.962.832.90.6570.8590.7780.8790.0910.6962.3412.516289.75.90609 - Oil & Gas Operations
Franklin Resources, Inc.BEN2.9310.912.40.4650.6370.1520.6370.8490.1913.2115.94.219.325.92.10718 - Investment Services
General Mills, Inc.GIS2.3063.153.40.2230.4650.5560.1220.1120.8284.9618.71.8115.9277.48.10515 - Food Processing
Halliburton CompanyHAL3.2850.917.10.3140.3840.5260.5660.5760.9193.9220.21.8710.360.29.40612 - Oil Well Services & Equipment
Hess Corp.HES5.17418.80.8890.8490.6670.920.920.9291.2612.61.435.821.79.90609 - Oil & Gas Operations
Hewlett-Packard CompanyHPQ4.3861.727.70.6270.7780.920.8590.5860.6162.4213.90.616.559.44.81006 - Computer Hardware
Home Depot, Inc., TheHD2.6682.140.80.0610.2730.6270.5560.2930.85810.721.71.5210.5154.38.20960 - Retail (Home Improvement)
Honeywell International Inc.HON2.5881.9340.2930.4550.5160.4150.6970.2124.0118.81.8811.337.82.31030 - Scientific & Technical Instruments
Huntsman CorporationHUN3.0221.843.50.4750.2130.930.5560.7880.063.05230.5810.528.30.90106 - Chemicals - Plastics and Rubbers
Illinois Tool Works Inc.ITW3.3252.224.90.2630.2630.3840.5160.930.9694.2521.92.4910.714.712.20415 - Auto & Truck Parts
International Paper CoIP2.749366.80.5260.2030.8890.2930.0810.7572.7123.60.712.7294.56.80133 - Paper & Paper Products
Kellogg CompanyK2.83336.10.1420.8490.5760.6770.0210.5656.1512.61.589803.84.40515 - Food Processing
Kimberly Clark CorpKMB2.2743.158.80.0810.4250.4950.3740.2230.6768.8619.51.9311.7194.25.40521 - Personal & Household Products
Kohl's CorporationKSS4.5382.635.90.6970.7180.910.8390.4450.9292.0914.60.646.688.79.90951 - Retail (Department & Discount)
Kraft Foods Group IncKRFT2.5483.738.70.1320.7380.5160.4650.2730.4246.2314.21.8811168.33.50515 - Food Processing
Las Vegas Sands Corp.LVS1.9222.952.30.1020.3040.1820.1420.5460.6467.6721.43.761572.950912 - Casinos & Gaming
Lockheed Martin CorporationLMT2.882351.50.0510.5060.7080.6770.4150.52512.8518.11.24995.74.20203 - Aerospace and Defense
Loews CorporationL2.3250.637.30.960.1520.7480.0710.3040.090.8425.61.1117.7143.51.40715 - Insurance (Property & Casualty)
Macy's, Inc.M3.871225.90.3440.6470.8490.8090.3940.8283.8215.30.797.2116.58.10951 - Retail (Department & Discount)
Magna International Inc. (USA)MGA4.3341.318.50.5860.6770.8990.7680.6170.7872.5515.10.687.7537.40415 - Auto & Truck Parts
Manulife Financial CorporationMFC4.0332.824.10.8090.950.7680.920.4650.1211.4710.51.025.884.51.70709 - Insurance (Life)
Marathon Oil CorporationMRO4.4062.1200.8390.6170.4650.960.7480.7771.3616.62.015.1316.90606 - Oil & Gas - Integrated

<COLGROUP><COL style="WIDTH: 140pt; mso-width-source: userset; mso-width-alt: 6802" width=186><COL style="WIDTH: 48pt; mso-width-source: userset; mso-width-alt: 2340" span=2 width=64><COL style="WIDTH: 48pt; mso-width-source: userset; mso-width-alt: 2340" span=8 width=64><COL style="WIDTH: 53pt; mso-width-source: userset; mso-width-alt: 2596" width=71><COL style="WIDTH: 48pt; mso-width-source: userset; mso-width-alt: 2340" span=6 width=64><COL style="WIDTH: 170pt; mso-width-source: userset; mso-width-alt: 8301" width=227><TBODY>
</TBODY>
Let me know if you want to see the formulas. Bobaree
 
Upvote 0
Column A contains "Company". Columns G-L contain the percentranks of the 6 columns to their right. Those 6 columns to the right contain the "hard" numbers that are converted into percentranks in G-L. Then, G-L are summed in Column D. Column D contains the data that I would hope to divide up into deciles.

CompanyTickerDecileSumYieldPayout Ratio 12mPercentile P/BookPercentile P/EPSPercentile P/SalesPercentile EV/EBITDAPercentile P/CFPSShareholder YieldPrice/BookP/EPSP/SalesEV/EBITDAP/CFPSShrhld YldIndustry
AbbVie IncABBV=SUM(G3:L3)361.8=1-PERCENTRANK.EXC($M$3:$M$100,M3)=1-PERCENTRANK.EXC($N$3:$N$100,N3)=1-PERCENTRANK.EXC($O$3:$O$100,O3)=1-PERCENTRANK.EXC($P$3:$P$100,P3)=1-PERCENTRANK.EXC($Q$3:$Q$100,Q3)=PERCENTRANK.EXC($R$3:$R$100,R3)16.8821.34.5714.6250.92.70803 - Biotechnology & Drugs
Agilent Technologies Inc.A=SUM(G4:L4)0.924=1-PERCENTRANK.EXC($M$3:$M$100,M4)=1-PERCENTRANK.EXC($N$3:$N$100,N4)=1-PERCENTRANK.EXC($O$3:$O$100,O4)=1-PERCENTRANK.EXC($P$3:$P$100,P4)=1-PERCENTRANK.EXC($Q$3:$Q$100,Q4)=PERCENTRANK.EXC($R$3:$R$100,R4)3.4128.12.7914.1288.22.41024 - Electronic Instruments & Controls
Allstate Corporation, TheALL=SUM(G5:L5)1.820.5=1-PERCENTRANK.EXC($M$3:$M$100,M5)=1-PERCENTRANK.EXC($N$3:$N$100,N5)=1-PERCENTRANK.EXC($O$3:$O$100,O5)=1-PERCENTRANK.EXC($P$3:$P$100,P5)=1-PERCENTRANK.EXC($Q$3:$Q$100,Q5)=PERCENTRANK.EXC($R$3:$R$100,R5)1.26120.767.8117.79.10715 - Insurance (Property & Casualty)
Aon PLCAON=SUM(G6:L6)1.218.8=1-PERCENTRANK.EXC($M$3:$M$100,M6)=1-PERCENTRANK.EXC($N$3:$N$100,N6)=1-PERCENTRANK.EXC($O$3:$O$100,O6)=1-PERCENTRANK.EXC($P$3:$P$100,P6)=1-PERCENTRANK.EXC($Q$3:$Q$100,Q6)=PERCENTRANK.EXC($R$3:$R$100,R6)3.3621.62.1817.6173.460712 - Insurance (Miscellaneous)
Apache CorporationAPA=SUM(G7:L7)127.4=1-PERCENTRANK.EXC($M$3:$M$100,M7)=1-PERCENTRANK.EXC($N$3:$N$100,N7)=1-PERCENTRANK.EXC($O$3:$O$100,O7)=1-PERCENTRANK.EXC($P$3:$P$100,P7)=1-PERCENTRANK.EXC($Q$3:$Q$100,Q7)=PERCENTRANK.EXC($R$3:$R$100,R7)1.1722.72.64.9134.92.30609 - Oil & Gas Operations
Apple Inc.AAPL=SUM(G8:L8)1.928.5=1-PERCENTRANK.EXC($M$3:$M$100,M8)=1-PERCENTRANK.EXC($N$3:$N$100,N8)=1-PERCENTRANK.EXC($O$3:$O$100,O8)=1-PERCENTRANK.EXC($P$3:$P$100,P8)=1-PERCENTRANK.EXC($Q$3:$Q$100,Q8)=PERCENTRANK.EXC($R$3:$R$100,R8)5.0416.43.429.6422.28.41003 - Communications Equipment
Applied Materials, Inc.AMAT=SUM(G9:L9)1.855.6=1-PERCENTRANK.EXC($M$3:$M$100,M9)=1-PERCENTRANK.EXC($N$3:$N$100,N9)=1-PERCENTRANK.EXC($O$3:$O$100,O9)=1-PERCENTRANK.EXC($P$3:$P$100,P9)=1-PERCENTRANK.EXC($Q$3:$Q$100,Q9)=PERCENTRANK.EXC($R$3:$R$100,R9)3.631.23.1714.330.40.61033 - Semiconductors
AT&T Inc.T=SUM(G10:L10)5.353.4=1-PERCENTRANK.EXC($M$3:$M$100,M10)=1-PERCENTRANK.EXC($N$3:$N$100,N10)=1-PERCENTRANK.EXC($O$3:$O$100,O10)=1-PERCENTRANK.EXC($P$3:$P$100,P10)=1-PERCENTRANK.EXC($Q$3:$Q$100,Q10)=PERCENTRANK.EXC($R$3:$R$100,R10)1.9510.11.385.126.78.60915 - Communications Services
Automatic Data ProcessingADP=SUM(G11:L11)2.347.5=1-PERCENTRANK.EXC($M$3:$M$100,M11)=1-PERCENTRANK.EXC($N$3:$N$100,N11)=1-PERCENTRANK.EXC($O$3:$O$100,O11)=1-PERCENTRANK.EXC($P$3:$P$100,P11)=1-PERCENTRANK.EXC($Q$3:$Q$100,Q11)=PERCENTRANK.EXC($R$3:$R$100,R11)5.9826.83.2712.2141.53.10909 - Business Services
Baker Hughes IncorporatedBHI=SUM(G12:L12)120.8=1-PERCENTRANK.EXC($M$3:$M$100,M12)=1-PERCENTRANK.EXC($N$3:$N$100,N12)=1-PERCENTRANK.EXC($O$3:$O$100,O12)=1-PERCENTRANK.EXC($P$3:$P$100,P12)=1-PERCENTRANK.EXC($Q$3:$Q$100,Q12)=PERCENTRANK.EXC($R$3:$R$100,R12)1.6523.71.289.6756.42.40612 - Oil Well Services & Equipment
Bank of America CorpBAC=SUM(G13:L13)1.26.2=1-PERCENTRANK.EXC($M$3:$M$100,M13)=1-PERCENTRANK.EXC($N$3:$N$100,N13)=1-PERCENTRANK.EXC($O$3:$O$100,O13)=1-PERCENTRANK.EXC($P$3:$P$100,P13)=1-PERCENTRANK.EXC($Q$3:$Q$100,Q13)=PERCENTRANK.EXC($R$3:$R$100,R13)0.76263.2533.33.60727 - Regional Banks
Bank of Nova Scotia (USA), TheBNS=SUM(G14:L14)3.646.1=1-PERCENTRANK.EXC($M$3:$M$100,M14)=1-PERCENTRANK.EXC($N$3:$N$100,N14)=1-PERCENTRANK.EXC($O$3:$O$100,O14)=1-PERCENTRANK.EXC($P$3:$P$100,P14)=1-PERCENTRANK.EXC($Q$3:$Q$100,Q14)=PERCENTRANK.EXC($R$3:$R$100,R14)2.0713.74.6610.1223.81.80727 - Regional Banks
Blackstone Group L.P., TheBX=SUM(G15:L15)5.352.9=1-PERCENTRANK.EXC($M$3:$M$100,M15)=1-PERCENTRANK.EXC($N$3:$N$100,N15)=1-PERCENTRANK.EXC($O$3:$O$100,O15)=1-PERCENTRANK.EXC($P$3:$P$100,P15)=1-PERCENTRANK.EXC($Q$3:$Q$100,Q15)=PERCENTRANK.EXC($R$3:$R$100,R15)2.9212.42.558.535.21.40718 - Investment Services
Bristol-Myers Squibb CoBMY=SUM(G16:L16)2.987.1=1-PERCENTRANK.EXC($M$3:$M$100,M16)=1-PERCENTRANK.EXC($N$3:$N$100,N16)=1-PERCENTRANK.EXC($O$3:$O$100,O16)=1-PERCENTRANK.EXC($P$3:$P$100,P16)=1-PERCENTRANK.EXC($Q$3:$Q$100,Q16)=PERCENTRANK.EXC($R$3:$R$100,R16)5.4231.25.1321.334.12.10803 - Biotechnology & Drugs
Brookfield Asset Management InBAM=SUM(G17:L17)1.315.1=1-PERCENTRANK.EXC($M$3:$M$100,M17)=1-PERCENTRANK.EXC($N$3:$N$100,N17)=1-PERCENTRANK.EXC($O$3:$O$100,O17)=1-PERCENTRANK.EXC($P$3:$P$100,P17)=1-PERCENTRANK.EXC($Q$3:$Q$100,Q17)=PERCENTRANK.EXC($R$3:$R$100,R17)1.5911.21.491446.31.30718 - Investment Services
Canadian Imperial Bank of CommCM=SUM(G18:L18)3.949.4=1-PERCENTRANK.EXC($M$3:$M$100,M18)=1-PERCENTRANK.EXC($N$3:$N$100,N18)=1-PERCENTRANK.EXC($O$3:$O$100,O18)=1-PERCENTRANK.EXC($P$3:$P$100,P18)=1-PERCENTRANK.EXC($Q$3:$Q$100,Q18)=PERCENTRANK.EXC($R$3:$R$100,R18)2.4913.43.588.8142.94.60724 - Money Center Banks
Capital One Financial Corp.COF=SUM(G19:L19)1.516.2=1-PERCENTRANK.EXC($M$3:$M$100,M19)=1-PERCENTRANK.EXC($N$3:$N$100,N19)=1-PERCENTRANK.EXC($O$3:$O$100,O19)=1-PERCENTRANK.EXC($P$3:$P$100,P19)=1-PERCENTRANK.EXC($Q$3:$Q$100,Q19)=PERCENTRANK.EXC($R$3:$R$100,R19)1.0511.12.4511.822.83.90727 - Regional Banks

<COLGROUP><COL style="WIDTH: 138pt; mso-width-source: userset; mso-width-alt: 3364" width=184><COL style="WIDTH: 33pt; mso-width-source: userset; mso-width-alt: 804" width=44><COL style="WIDTH: 39pt; mso-width-source: userset; mso-width-alt: 950" width=52><COL style="WIDTH: 65pt; mso-width-source: userset; mso-width-alt: 1572" width=86><COL style="WIDTH: 26pt; mso-width-source: userset; mso-width-alt: 621" width=34><COL style="WIDTH: 30pt; mso-width-source: userset; mso-width-alt: 731" width=40><COL style="WIDTH: 155pt; mso-width-source: userset; mso-width-alt: 3766" width=206><COL style="WIDTH: 146pt; mso-width-source: userset; mso-width-alt: 3547" span=2 width=194><COL style="WIDTH: 150pt; mso-width-source: userset; mso-width-alt: 3657" width=200><COL style="WIDTH: 152pt; mso-width-source: userset; mso-width-alt: 3693" width=202><COL style="WIDTH: 144pt; mso-width-source: userset; mso-width-alt: 3510" width=192><COL style="WIDTH: 38pt; mso-width-source: userset; mso-width-alt: 914" width=50><COL style="WIDTH: 32pt; mso-width-source: userset; mso-width-alt: 768" width=42><COL style="WIDTH: 35pt; mso-width-source: userset; mso-width-alt: 841" width=46><COL style="WIDTH: 32pt; mso-width-source: userset; mso-width-alt: 768" width=42><COL style="WIDTH: 39pt; mso-width-source: userset; mso-width-alt: 950" width=52><COL style="WIDTH: 41pt; mso-width-source: userset; mso-width-alt: 987" width=54><COL style="WIDTH: 150pt; mso-width-source: userset; mso-width-alt: 3657" width=200><TBODY>
</TBODY>
 
Upvote 0
I think it does or is getting very close. Can it be written to do the ranking to the last row rather than a set number, and can it be set so that the highest numbers go into decile 1? Thanks for your help. The formula seems so much simpler than what I was trying to work with. Bobaree

By the way, when I try to sort the decile column from high to low or low to high, the numbers don't seem to be sorting the entire spreadsheet, but rather jumping around. Can that be fixed?
 
Last edited:
Upvote 0
To reverse the order and use the last row:

=11-MAX(1,CEILING(PERCENTRANK(D$2:INDEX(D:D,MATCH(9.99999999999999E+307,D:D)),D2)*10,1))

I had no problem sorting by the column containing that formula. Make sure that you select all the data.
 
Upvote 0

Forum statistics

Threads
1,214,653
Messages
6,120,751
Members
448,989
Latest member
mariah3

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top