Excel VBA Course
Excel VBA Course - From Beginner to Expert

200+ Video Lessons
50+ Hours of Video
200+ Excel Guides

Become a master of VBA and Macros in Excel and learn how to automate all of your tasks in Excel with this online course. (No VBA experience required.)

View Course

how to calculate or identify the values within highest 10%

0

Hi, anybody that could help with this, thanks in advance.... From a data set of numerical values, let's say a data set of 400 measurements (entries, data points, rows), how to calculate or identify the values within highest 10%, within the second highest 10%, within the third highest 10% and within the lowest 20%?

Answer
Discuss

Answers

0
Selected Answer

Hi Luigigeo and welcome to the Forum.

You can use Conditional Formatting to do that.

That's illustrated in the attached file- see column C where values just rise.

To do that, I did these steps:

  1. Highlight cells C2:C26
  2. Ribbon Home/(Styles)/Conditional Formatting
  3. Down arrow Top/Bottom Rules
  4. Right arrow Top 10%

In new requestor, tick/ check the box "% of selected range" then click Format... and in next requestor, pick a Fill, say pale green then Okay and Okay again.

The values in the top 10% of values will then appear shaded pale green. You then need to add other rules

Then go ribbon Home/(Styles)/Conditional Formatting/Manage Rules... In the requestor, pick "This Worksheet" at the top, select the rule then duplicate it 3 times. Pick each new rule in turn and select Edit Rule... then adjust each rule/fill to give rules like:

  • Top 10% (pale green)
  • Top 20% (pale blue)
  • Top 30% (pale gold)
  • Bottom 20% (pale purple)

(where the order matters).

Press Okay and the colours will be displayed. If you adjust a cell (say change C26 from 25 to 1), you'll see the shading alters to suit. 

The Top 10% appears over the Top 20% so that rule (pale blue) indicates the second top 10% etc.

I used Format Painter to copy the conditional formatting of C2:C26 to D2:D26 and E2:E26 so each column has its ranking.

Note that Conditional Formatting can also give the Top 10 values from a range (etc), if you just want the 10 highest values (rather than values in the highest 10% which you asked for). Unclick the "% of selected range" box and the 10 top value cells will follow the rule.

Hope this fixes your problem. If so, please be sure to mark this Answer as Selected.

Discuss

Discussion

many thanks
luigigeo (rep: 2) Jul 11, '23 at 4:27 am
Glad that worked for you. Thanks for selecting my Answer. Luigigeo
John_Ru (rep: 6142) Jul 11, '23 at 5:50 am
Add to Discussion


Answer the Question

You must create an account to use the forum. Create an Account or Login