Squarespaceâ€™s all-in-one platform gives you everything you need to express yourself creatively online, whether it is with a domain, website, or online store. Get started with your free trial today, and when ready, take 10% off your first purchase with offer code 'EXPERTS'.

Function TieredCalc(dblAmt As Double) As Double

Dim dblPercentAmt As Double

dblPercentAmt = 0

If dblAmt > 2500000 Then 'Calculate first tiered amount

dblPercentAmt = (MinOf2(dblAmt, 5000000) - 2500000) * 0.04

End If

If dblAmt > 5000000 Then 'Calculate 2nd tiered amount + 1st tiered amount

dblPercentAmt = dblPercentAmt + (MinOf2(dblAmt, 10000000) - 5000000) * 0.06

End If

If dblAmt > 10000000 Then 'Calculate 3rd tiered amount + first 2 tiered amounts

dblPercentAmt = dblPercentAmt + (dblAmt - 10000000) * 0.08

End If

If dblAmt > 15000000 Then 'Calculate 20000 per million over 15 million

dblPercentAmt = dblPercentAmt + Int((dblAmt - 15000000) / 1000000) * 20000

End If

TieredCalc = dblPercentAmt

End Function

Function MinOf2(dblFirst As Double, dblSecond As Double) As Double

If dblFirst < dblSecond Then

MinOf2 = dblFirst

Else

MinOf2 = dblSecond

End If

End Function

John