Function sbRandCDFInv(dParam1 As Double, dParam2 As Double, _
dParam3 As Double, Optional dRandom = 1#) As Double
'Source: https://berndplumhoff.gitbook.io/sulprobil/excel/excel-vba-solutions/sbrandcdfinv
Static bRandomized As Boolean
If dRandom < 0# Or dRandom > 1# Then
sbRandCDFInv = CVErr(xlErrValue)
'Here you need to define the inverse of the cumulative distribution function
sbRandCDFInv = sbRandTriang(dParam1, dParam2, dParam3, dRand)