ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Discussion (Misc queries) (https://www.excelbanter.com/excel-discussion-misc-queries/)
-   -   Help with the IF formula (https://www.excelbanter.com/excel-discussion-misc-queries/12796-help-if-formula.html)

Asta

Help with the IF formula
 
i have created a payroll spreadsheet and now im currently having issues with
adding the tax.
The tax goes like this:
if $346 - $480 deduct $63 and 25c for each dollar over $346
$481 - $672 deduct 96 and 40c for each dollar over $481

i just need help in how i'd go about making a formula like that. there is
alot more like that but i'd be able to figure it out i just need to know how
i would go creating such a formula?

Peo Sjoblom

http://www.mcgimpsey.com/excel/variablerate.html

--
Regards,

Peo Sjoblom

(No private emails please, for everyone's
benefit keep the discussion in the newsgroup/forum)



"Asta" wrote in message
...
i have created a payroll spreadsheet and now im currently having issues
with
adding the tax.
The tax goes like this:
if $346 - $480 deduct $63 and 25c for each dollar over $346
$481 - $672 deduct 96 and 40c for each dollar over $481

i just need help in how i'd go about making a formula like that. there is
alot more like that but i'd be able to figure it out i just need to know
how
i would go creating such a formula?




Asta

The last reply did help kind of. but its way to confusing for me. I've been
stuck on this problem for about 10 hrs now and i have to hand it in on monday
and i really need to finish the rest which is dependent on that lil bit

"Asta" wrote:

i have created a payroll spreadsheet and now im currently having issues with
adding the tax.
The tax goes like this:
if $346 - $480 deduct $63 and 25c for each dollar over $346
$481 - $672 deduct 96 and 40c for each dollar over $481

i just need help in how i'd go about making a formula like that. there is
alot more like that but i'd be able to figure it out i just need to know how
i would go creating such a formula?


R.VENKATARAMAN

the deductions are not clear. as far as I understood I give the vba sub
which you can run. The data is in B7 to B19

Public Sub test()
Dim cell As Range
For Each cell In Range("B7:B19")
cell.Activate
If ActiveCell = 346 And ActiveCell <= 480 Then ActiveCell.Offset(0, 1) = 63
+ 0.25 * (ActiveCell - 346)
If ActiveCell = 481 And ActiveCell <= 672 Then ActiveCell.Offset(0, 1) = 96
+ 0.4 * (ActiveCell - 481)
Next
End Sub

see wthether logic of deduction is correct by checking one or two figures
between 346 and 480 and again between 481 and 672 . in C colum you will get
the tax deduction.

is it ok


Asta wrote in message
...
The last reply did help kind of. but its way to confusing for me. I've

been
stuck on this problem for about 10 hrs now and i have to hand it in on

monday
and i really need to finish the rest which is dependent on that lil bit

"Asta" wrote:

i have created a payroll spreadsheet and now im currently having issues

with
adding the tax.
The tax goes like this:
if $346 - $480 deduct $63 and 25c for each dollar over $346
$481 - $672 deduct 96 and 40c for each dollar over $481

i just need help in how i'd go about making a formula like that. there

is
alot more like that but i'd be able to figure it out i just need to know

how
i would go creating such a formula?








HokieLawrence

=IF(AND(A1=346,A1<=480),(A1-346)*63.25,IF(AND(A1=481,A1<=672),(A1-481)*96.40),"no deduction"))

HokieLawrence


"Asta" wrote:

The last reply did help kind of. but its way to confusing for me. I've been
stuck on this problem for about 10 hrs now and i have to hand it in on monday
and i really need to finish the rest which is dependent on that lil bit

"Asta" wrote:

i have created a payroll spreadsheet and now im currently having issues with
adding the tax.
The tax goes like this:
if $346 - $480 deduct $63 and 25c for each dollar over $346
$481 - $672 deduct 96 and 40c for each dollar over $481

i just need help in how i'd go about making a formula like that. there is
alot more like that but i'd be able to figure it out i just need to know how
i would go creating such a formula?



All times are GMT +1. The time now is 07:05 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
ExcelBanter.com