Hey everyone, I have a table, that is going to used to calculate IFTA, its a fueltax calculator populated by each state and the rate of each state. My question is, do i need to create a formula for each state? or can i do 1 formula and have it read for each class? Where it says [StateName] that is going to change to what state it is for.
<table class="IFTAtable" id="FuelTaxIFTA" width="100%" border="1" cellpadding="2.5" cellspacing="5">
<tr>
<th>Juristiction</th>
<th>Rate Code</th>
<th>Total IFTA Miles by State</th>
<th>Taxable Miles</th>
<th>MPG </th>
<th>Taxable Gallons</th>
<th>Tax Paid Gallons</th>
<th>Net Taxable Gallons</th>
<th>Tax Rate</th>
<th>Tax Credit or Tax Due</th>
<th>Interest </th>
<th>Total Due</th>
</tr>
<tr>
<td>CT</td>
<td>089</td>
<td><input name="stateMiles" type="text" class="[stateName]Miles" readonly="readonly" /> </td>
<td><input type="text" name="stateMiles" class="[stateName]Miles" readonly="readonly" /></td>
<td><input id="MPG" type="text" name="mpg" class="mpg" readonly="readonly"></td>
<td><input type="text" readonly="readonly" class="calcTax[State]" /></td>
<td><input type="text" class="taxPdGallons[State]" tabindex="1" autofocus="autofocus" placeholder="TCH RPT" /></td>
<td>taxableGallons(-)TaxPaid</td>
<td>.4170</td>
<td>netTaxGallons * Tax Rate</td>
<td> </td>
<td><p>taxCredit+Intrest</p></td>
</tr>
<tr>
<td>DE</td>
<td>086</td>
<td><input type="text" name="stateMiles" class="[stateName]Miles" readonly="readonly" /></td>
<td><input type="text" name="stateMiles" class="[stateName]Miles" readonly="readonly" /></td>
<td><input id="MPG" type="text" name="mpg" class="mpg" readonly="readonly"></td>
<td><input type="text" readonly="readonly" class="calcTax[State]" /></td>
<td><input type="text" class="taxPdGallons[State]" tabindex="2" placeholder="TCH RPT" /></td>
<td> </td>
<td>.2200</td>
<td> </td>
<td> </td>
<td> </td>
</tr>
<tr>
<td>IN</td>
<td>179</td>
<td><input type="text" name="stateMiles" class="[stateName]Miles" readonly="readonly" /></td>
<td><input type="text" name="stateMiles" class="[stateName]Miles" readonly="readonly" /></td>
<td><input id="MPG" type="text" name="mpg" class="mpg" readonly="readonly"></td>
<td><input type="text" readonly="readonly" class="calcTax[State]" /></td>
<td><input type="text" class="taxPdGallons[State]" tabindex="3" placeholder="TCH RPT" /></td>
<td> </td>
<td>.4700</td>
<td> </td>
<td> </td>
<td> </td>
</tr>
<tr>
<td>KY</td>
<td>171</td>
<td><input type="text" name="stateMiles" class="[stateName]Miles" readonly="readonly" /></td>
<td><input type="text" name="stateMiles" class="[stateName]Miles" readonly="readonly" /></td>
<td><input id="MPG" type="text" name="mpg" class="mpg" readonly="readonly"></td>
<td><input type="text" readonly="readonly" class="calcTax[State]" /></td>
<td><input type="text" class="taxPdGallons[State]" tabindex="4" placeholder="TCH RPT" /></td>
<td> </td>
<td>.2160</td>
<td> </td>
<td> </td>
<td> </td>
</tr>
<tr>
<td>MA</td>
<td>089</td>
<td><input type="text" name="stateMiles" class="[stateName]Miles" readonly="readonly" /></td>
<td><input type="text" name="stateMiles" class="[stateName]Miles" readonly="readonly" /></td>
<td><input id="MPG" type="text" name="mpg" class="mpg" readonly="readonly"></td>
<td><input type="text" readonly="readonly" class="calcTax[State]" /></td>
<td><input type="text" class="taxPdGallons[State]" tabindex="5" placeholder="TCH RPT" /></td>
<td> </td>
<td>.2400</td>
<td> </td>
<td> </td>
<td> </td>
</tr>
<tr>
<td>MD</td>
<td>088</td>
<td><input type="text" name="stateMiles" class="[stateName]Miles" readonly="readonly" /></td>
<td><input type="text" name="stateMiles" class="[stateName]Miles" readonly="readonly" /></td>
<td><input id="MPG" type="text" name="mpg" class="mpg" readonly="readonly"></td>
<td><input type="text" readonly="readonly" class="calcTax[State]" /></td>
<td><input type="text" class="taxPdGallons[State]" tabindex="6" placeholder="TCH RPT" /></td>
<td> </td>
<td>.3455</td>
<td> </td>
<td> </td>
<td> </td>
</tr>
<tr>
<td>ME</td>
<td>085</td>
<td><input type="text" name="stateMiles" class="[stateName]Miles" readonly="readonly" /></td>
<td><input type="text" name="stateMiles" class="[stateName]Miles" readonly="readonly" /></td>
<td><input id="MPG" type="text" name="mpg" class="mpg" readonly="readonly"></td>
<td><input type="text" readonly="readonly" class="calcTax[State]" /></td>
<td><input type="text" class="taxPdGallons[State]" tabindex="7" placeholder="TCH RPT" /></td>
<td> </td>
<td>.3120</td>
<td> </td>
<td> </td>
<td> </td>
</tr>
<tr>
<td>NH</td>
<td>084</td>
<td><input type="text" name="stateMiles" class="[stateName]Miles" readonly="readonly" /></td>
<td><input type="text" name="stateMiles" class="[stateName]Miles" readonly="readonly" /></td>
<td><input id="MPG" type="text" name="mpg" class="mpg" readonly="readonly"></td>
<td><input type="text" readonly="readonly" class="calcTax[State]" /></td>
<td><input type="text" class="taxPdGallons[State]" tabindex="8" placeholder="TCH RPT" /></td>
<td> </td>
<td>.2220</td>
<td> </td>
<td> </td>
<td> </td>
</tr>
<tr>
<td>NJ</td>
<td>087</td>
<td><input type="text" name="stateMiles" class="[stateName]Miles" readonly="readonly" /></td>
<td><input type="text" name="stateMiles" class="[stateName]Miles" readonly="readonly" /></td>
<td><input id="MPG" type="text" name="mpg" class="mpg" readonly="readonly"></td>
<td><input type="text" readonly="readonly" class="calcTax[State]" /></td>
<td><input type="text" class="taxPdGallons[State]" tabindex="9" placeholder="TCH RPT" /></td>
<td> </td>
<td>.4420</td>
<td> </td>
<td> </td>
<td> </td>
</tr>
<tr>
<td>NY</td>
<td>088</td>
<td><input type="text" name="stateMiles" class="[stateName]Miles" readonly="readonly" /></td>
<td><input type="text" name="stateMiles" class="[stateName]Miles" readonly="readonly" /></td>
<td><input id="MPG" type="text" name="mpg" class="mpg" readonly="readonly"></td>
<td><input type="text" readonly="readonly" class="calcTax[State]" /></td>
<td><input type="text" class="taxPdGallons[State]" tabindex="10" placeholder="TCH RPT" /></td>
<td> </td>
<td>.3785</td>
<td> </td>
<td> </td>
<td> </td>
</tr>
<tr>
<td>OH</td>
<td>130</td>
<td><input type="text" name="stateMiles" class="[stateName]Miles" readonly="readonly" /></td>
<td><input type="text" name="stateMiles" class="[stateName]Miles" readonly="readonly" /></td>
<td><input id="MPG" type="text" name="mpg" class="mpg" readonly="readonly"></td>
<td><input type="text" readonly="readonly" class="calcTax[State]" /></td>
<td><input type="text" class="taxPdGallons[State]" tabindex="11" placeholder="TCH RPT" /></td>
<td> </td>
<td>.2800</td>
<td> </td>
<td> </td>
<td> </td>
</tr>
<tr>
<td>PA</td>
<td>095</td>
<td><input type="text" name="stateMiles" class="[stateName]Miles" readonly="readonly" /></td>
<td><input type="text" name="stateMiles" class="[stateName]Miles" readonly="readonly" /></td>
<td><input id="MPG" type="text" name="mpg" class="mpg" readonly="readonly"></td>
<td><input type="text" readonly="readonly" class="calcTax[State]" /></td>
<td><input type="text" class="taxPdGallons[State]" tabindex="12" placeholder="TCH RPT" /></td>
<td> </td>
<td>.7470</td>
<td> </td>
<td> </td>
<td> </td>
</tr>
<tr>
<td>RI</td>
<td>086</td>
<td><input type="text" name="stateMiles" class="[stateName]Miles" readonly="readonly" /></td>
<td><input type="text" name="stateMiles" class="[stateName]Miles" readonly="readonly" /></td>
<td><input id="MPG" type="text" name="mpg" class="mpg" readonly="readonly"></td>
<td><input type="text" readonly="readonly" class="calcTax[State]" /></td>
<td><input type="text" class="taxPdGallons[State]" tabindex="13" placeholder="TCH RPT" /></td>
<td> </td>
<td>.3300</td>
<td> </td>
<td> </td>
<td> </td>
</tr>
<tr>
<td>VA</td>
<td>175</td>
<td><input type="text" name="stateMiles" class="[stateName]Miles" readonly="readonly" /></td>
<td><input type="text" name="stateMiles" class="[stateName]Miles" readonly="readonly" /></td>
<td><input id="MPG" type="text" name="mpg" class="mpg" readonly="readonly"></td>
<td><input type="text" readonly="readonly" class="calcTax[State]" /></td>
<td><input type="text" class="taxPdGallons[State]" tabindex="14" placeholder="TCH RPT" /></td>
<td> </td>
<td>.2020</td>
<td> </td>
<td> </td>
<td> </td>
</tr>
<tr>
<td>VT</td>
<td>098</td>
<td><input type="text" name="stateMiles" class="[stateName]Miles" readonly="readonly" /></td>
<td><input type="text" name="stateMiles" class="[stateName]Miles" readonly="readonly" /></td>
<td><input id="MPG" type="text" name="mpg" class="mpg" readonly="readonly"></td>
<td><input type="text" readonly="readonly" class="calcTax[State]" /></td>
<td><input type="text" class="taxPdGallons[State]" tabindex="15" placeholder="TCH RPT" /></td>
<td> </td>
<td>.3100</td>
<td> </td>
<td> </td>
<td> </td>
</tr>
<tr>
<td>WV</td>
<td>088</td>
<td><input type="text" name="stateMiles" class="[stateName]Miles" readonly="readonly" /></td>
<td><input type="text" name="stateMiles" class="[stateName]Miles" readonly="readonly" /></td>
<td><input id="MPG" type="text" name="mpg" class="mpg" readonly="readonly"></td>
<td><input type="text" readonly="readonly" class="calcTax[State]" /></td>
<td><input type="text" class="taxPdGallons[State]" tabindex="16" placeholder="TCH RPT" /></td>
<td> </td>
<td>.3570</td>
<td> </td>
<td> </td>
<td> </td>
</tr>
</table>