USP <905> Content Uniformity

I am working on calculating USP <905> Content Uniformity within a report and I would like some feedback.  Our current practice has the calculation either performed by hand, or entered into a validated spreadsheet.  I have come up with the following code but I would like to know if there is a way to do this without using custom code.

Public Function CUAV(ByVal T As Double, ByVal Avg As Double, ByVal SD As Double) As Double
    Dim UL As Double
    Dim M As Double
    If T <= 101.5 Then
        UL = 101.5
    Else
        UL = T
    End If
    If Avg < 98.5 Then
        M = 98.5
    Else
        If Avg > UL Then
            M = UL
        Else
            M = Avg
        End If
    End If
    CUAV = (Abs(Avg - M) + (2.4 * SD))
    Return CUAV
End Function

In my report, I have a table assign the average and standard deviation of the compound amount as variables and the T value is taken from a compound custom field. 

Parents Reply Children
No Data
Was this helpful?