The First Part will show you how to colorize the Rookie-Marks.
The Second Function calculates an overall value based on the scouting-marks
Sorry, I have no web-space to post a file!
Create an Excel-table like this:
Visits
Name
Forename
Pos
FG
3PT
FT
Ins.Scr
Dunk
Steal
BlockO.Reb
D.Reb
Pass
O.Aware
D.Aware
Dribble
Quick
Speed
Jump
Strgth
Stamina
Hardiness
Overall
Age
Potential
Projected
PDD
Height
Weight
(in one line oc...)
Visits;Name;Forename;Pos;FG;3PT;FT;Ins.Scr;Dunk;Steal;Block;O.Reb;
D.Reb;Pass;O.Aware;D.Aware;Dribble;Quick;Speed;Jump;Strgth;Stamina;
Hardiness;Overall;Age;Potential;Projected;PDD;Height;Weight
press [alt]-F11 to start the vba-editor and DoubleClick "Table1" or whatever...
- Code: Select all
Private Sub Scorecolors()
Dim RaB As Range, RaZ As Range
Set RaB = Application.Selection
For Each RaZ In RaB
If Not Intersect(RaZ, RaB) Is Nothing Then
Select Case RaZ.Value
Case "A+"
RaZ.Interior.Color = RGB(0, 255, 0)
Case "A"
RaZ.Interior.Color = RGB(0, 255, 0)
Case "A-"
RaZ.Interior.Color = RGB(0, 255, 0)
Case "B+"
RaZ.Interior.Color = RGB(0, 144, 125)
Case "B"
RaZ.Interior.Color = RGB(0, 144, 125)
Case "B-"
RaZ.Interior.Color = RGB(0, 144, 125)
Case "C+"
RaZ.Interior.Color = RGB(0, 48, 225)
Case "C"
RaZ.Interior.Color = RGB(0, 48, 225)
Case "C-"
RaZ.Interior.Color = RGB(0, 48, 225)
Case "D+"
RaZ.Interior.Color = RGB(98, 0, 184)
Case "D"
RaZ.Interior.Color = RGB(98, 0, 184)
Case "D-"
RaZ.Interior.Color = RGB(98, 0, 184)
Case "E+"
RaZ.Interior.Color = RGB(255, 0, 0)
Case "E"
RaZ.Interior.Color = RGB(255, 0, 0)
Case "E-"
RaZ.Interior.Color = RGB(255, 0, 0)
Case Else
RaZ.Interior.Color = RGB(255, 255, 255)
End Select
End If
Next RaZ
Set RaB = Nothing
End Sub
...and paste it there
now range FG - Hardiness on your excel-table and press run on the Scorecolors()-Function.
............
Next: the Overall-Function
Zelle = cell
Bereich = range
Example:
=CalcOverall(E2:W2)
- Code: Select all
Function CalcOverall(Bereich As Range)
tmp = 0
For Each Zelle In Bereich.Cells
Select Case Zelle.Value
Case "A+"
tmp = tmp + 15
Case "A"
tmp = tmp + 14
Case "A-"
tmp = tmp + 13
Case "B+"
tmp = tmp + 12
Case "B"
tmp = tmp + 11
Case "B-"
tmp = tmp + 10
Case "C+"
tmp = tmp + 9
Case "C"
tmp = tmp + 8
Case "C-"
tmp = tmp + 7
Case "D+"
tmp = tmp + 6
Case "D"
tmp = tmp + 5
Case "D-"
tmp = tmp + 4
Case "E+"
tmp = tmp + 3
Case "E"
tmp = tmp + 2
Case "E-"
tmp = tmp + 1
End Select
Next Zelle
CalcOverall = tmp
End Function
have a nice day