I need to convert a percentage to a scoring system in Excel 2003, either using a built-in formula (preferable) or writing a custom function in VBA. The formula or function must accept a parameter allowing me to specify the maximum score.
For example, let’s say there’s a function called Pct2Score(Pct As String, MaxScore As Integer) that does just this.
Pct2Score(“65%”, 4) would return 3 because it would use this distribution:
0%-24.9% = 1
25-49.9% = 2
50-74.9% = 3
75-100% = 4
Pct2Score(“65%”, 5) would return 4 because it would use this distribution:
0-19.9% = 1
20%-39.9% = 2
40-59.9% = 3
60-79.9% = 4
80-100% = 5
And so on so forth. I’m hoping there is a built-in distribution formula in Excel that does exactly this so that I won’t have to rely on VBA. It’s even OK to use a combination of formulas to achieve this; the only limitation is that I need everything to be contained in one formula.
A simple formula (descriptive, not Excel) is simply:
Using VBA:
With a single formula you can do
where A1 is Pct and B1 is MaxScore.