Excel VBA Code for finding the 10th percentile value for a certain bin Range

raishikoh

New Member
Joined
Feb 14, 2013
Messages
7
Hello everyone

I hope that you all are fine.

I have an excel sheet, and I am trying to bring some sort of automation in to that sheet (since I use it quite often) with the help of macros. The fact is that I am really new to macros and VBA programming language, so I need a little help in writing the code to find the 10th percentile for each bin value (50, 100, 150).
If you see the picture attached, the wanted percentile values are in Q, the bins for which I want to find the 10th percentile value, are given in Column M and the main data on which the 10 percentile value will be based is given in Column D.
By Using the data given in D and filtering out a certain bin width in column E (Example: Filtering bin width 50 or 100), we could find the Percentile value against each of the bin value given in Column N.

As said earlier I am new to VBA code, so any help will be appreciated in order to find the percentile values for each bin.
I can give the excel sheet as well if someone want to try hand on it, and let's me know the email address.

Additional Note: (The spread sheet is sorted out with respect to column E, is Ascending order (50, 100, 150) and the number of count for each bin width is given in column O, so you can just find the range of each bin by adding the count for each bin i.e range for first bin (50) is from 1 to 1+8542, similarly the range for the second bin (100) is given by 1+8542 to 1+8542+6862.

I will be very grateful if someone spares some time for me.

Kind Regards
raishikoh
FXGORUYHD4VOBHD.LARGE.jpg
 

Excel Facts

VLOOKUP to Left?
Use =VLOOKUP(A2,CHOOSE({1,2},$Z$1:$Z$99,$Y$1:$Y$99),2,False) to lookup Y values to left of Z values.

Forum statistics

Threads
1,215,453
Messages
6,124,920
Members
449,195
Latest member
Stevenciu

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