Results 1 to 19 of 19

Thread: Dynamic tax calculator

Threaded View

Previous Post Previous Post   Next Post Next Post
  1. #13
    VBAX Sage SamT's Avatar
    Joined
    Oct 2006
    Location
    Near Columbia
    Posts
    7,709
    Location
    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.
    Last edited by Aussiebear; 04-02-2025 at 05:09 AM.
    Please take the time to read the Forum FAQ

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •