Sub DoTheMath ()
Schemerige LastR zoals lang
Met ActiveSheet
LastR =. Cellen (. Rows.Count, „c“). Eind (xlUp). Rij
. Waaier („d2: D“ & LastR). Formule = „=VLOOKUP (PERCENTRANK (C$2: C$“ & LastR & _
„, C2), {0, "" D ""; 0.2500001, "" C ""; 0.5000001, "" B ""; 0.7500001, "" A ""}, 2)“
. Waaier („B“ & (LastR + 2)) = „Totaal“
. Waaier („c“ & (LastR + 2)). Formule = „=SUM (C2: C“ & LastR &“) „
Eind met
Sub van het eind
|