Results 1 to 19 of 19

Thread: Dynamic tax calculator

Threaded View

Previous Post Previous Post   Next Post Next Post
  1. #15
    VBAX Regular
    Joined
    Aug 2016
    Posts
    10
    Location
    OK, this is starting to make sense. Another question I have, say income is greater than 65k, my final break point, (at which point everything above 65k is charged at a fixed %). Should I just add another scenario to my if statement?
    for i = array1 to array 2
         if (i)= 1 then
               totaltax=array1*array2
         Elseif (i)> 1 and income < array1(i)
               totaltax=totaltax+((arrBreakPoint(i)-arrBreakPoint(i-1))*arrTaxPct(i))
         Else 
               totalTax=totalTax+((income-arrBreakPoint(i))*arrTaxPct(i))
         End If
    Next i
    Also your last two lines of code make sense, and I understand why I need them. But I'm a little confused as to where I would put them? Should I determine if income < 15k before starting my for loop?
    Last edited by Roofasa; 08-05-2016 at 04:06 PM. Reason: clarification

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
  •