This is the executing part of your function rewritten using the actual numbers extant at the start of execution. Assuming an income of 30K.
For i = 0 to 3
' i = 0
Do while 30K > 15K.
If 30K < 45K then
TotalTax = 0
Else
TotalTax = TotalTax + (15K - arrBreakPoint(0 - 1)) * 0.00
This is the executing part assuming an income of 50K or greater
For i = 0 to 3
Do while 50K > 15K
If 50K > 45> then
TotalTax = 50K - 45K * 0.0
End if
Loop 'While 50K > 15K
Now, assuming an income of 10K
For i = 0 to 3
Next i
' Function returns it's initial value of 0
' Whoa, that was fast. And it returned the correct result!
STOP! Copy this code to Notebook and think about it while reading my post #6 before reading my next post.