Re: Need help on a Query Calculation

Tech-Archive recommends: Fix windows errors by optimizing your registry



Perhaps this VBA function will do what you want.

Public Function fGetTotal(Lbase As Long, Ltop As Long, Llevel As Long)
Dim Lsum As Long
Dim iLoop As Long

For iLoop = Lbase To Ltop Step Llevel
Lsum = Lsum + iLoop
Next iLoop

Lsum = 2 * Lsum - Ltop
fGetTotal = Lsum

End Function
.



Relevant Pages