robmarr700
asked on
IF formula, more than one arguement?
How would I translate the argument below into a formula?
IF A2 => 12000 but < 24000 then return A2*0.02
IF A2=>24000 but < 36000 then return A2*0.03
IF A2 =>36000 but < 48000 then return A2*0.04
IF A2 =>48000 but < 60000 then return A2*0.05
Hypothetically speaking cell A2 could be populated "1369"
I'm intending on copying the formula down for all values in column 2
Thanks Rob
IF A2 => 12000 but < 24000 then return A2*0.02
IF A2=>24000 but < 36000 then return A2*0.03
IF A2 =>36000 but < 48000 then return A2*0.04
IF A2 =>48000 but < 60000 then return A2*0.05
Hypothetically speaking cell A2 could be populated "1369"
I'm intending on copying the formula down for all values in column 2
Thanks Rob
For the given case you can also try
=(1+INT(A2/12000))/100*A2
=(1+INT(A2/12000))/100*A2
ASKER
Good Point Rory see the amended argument below
how would the formula look now?
IF A2<12000 then return A2*0
IF A2 => 12000 but < 24000 then return A2*0.02
IF A2=>24000 but < 36000 then return A2*0.03
IF A2 =>36000 but < 48000 then return A2*0.04
IF A2 =>48000 but < 60000 then return A2*0.05
IF A2 =>60000 return A2*0.06
Rob
how would the formula look now?
IF A2<12000 then return A2*0
IF A2 => 12000 but < 24000 then return A2*0.02
IF A2=>24000 but < 36000 then return A2*0.03
IF A2 =>36000 but < 48000 then return A2*0.04
IF A2 =>48000 but < 60000 then return A2*0.05
IF A2 =>60000 return A2*0.06
Rob
=IF(A2<12000,0,MIN(0.06,(1 +INT(A2/12 000))/100) *A2)
Similar vain to Rory but using a lookup on a separate table of values:
=A2*VLOOKUP(A2,$A$3:$B$8,2 )
With A3:B8 being:
-9999 0
12000 0.02
24000 0.03
36000 0.04
48000 0.05
60000 0.06
Thanks
Rob H
=A2*VLOOKUP(A2,$A$3:$B$8,2
With A3:B8 being:
-9999 0
12000 0.02
24000 0.03
36000 0.04
48000 0.05
60000 0.06
Thanks
Rob H
ASKER
What would the full formula be? Also bear in mind the "A2*" element will not always be at the fixed intervals.
In the future they could be 0.1, 0.04, 0.37 (example)
In the future they could be 0.1, 0.04, 0.37 (example)
What I posted would be the full formula.
The range A3:B8 would be set elsewhere in your workbook, I merely used it on a blank sheet. When the required values change, you would just change them in the table rather than having to adjust all formulas.
The lookup formula normally has four parameters:
1) Lookup Value - what you are looking for
2) Lookup Range - the range that you are looking in
3) Offset Value - the column that has the result you want
4) Lookup type - False will try to find an exact match, True or omitted (as I have done) will find an approximate match that is not greater than the lookup value, eg 12500 would stop at 12000 as next option is 24000 so is greater than lookup value.
Copied down the reference to A2 will change but the reference to the table won't as I have made it an absolute reference.
Thanks
Rob H
The range A3:B8 would be set elsewhere in your workbook, I merely used it on a blank sheet. When the required values change, you would just change them in the table rather than having to adjust all formulas.
The lookup formula normally has four parameters:
1) Lookup Value - what you are looking for
2) Lookup Range - the range that you are looking in
3) Offset Value - the column that has the result you want
4) Lookup type - False will try to find an exact match, True or omitted (as I have done) will find an approximate match that is not greater than the lookup value, eg 12500 would stop at 12000 as next option is 24000 so is greater than lookup value.
Copied down the reference to A2 will change but the reference to the table won't as I have made it an absolute reference.
Thanks
Rob H
SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
=IF(A2<12000,A2*0,IF(A2<24 000,A2*0.0 2,IF(A2<36 000,A2*0.0 3,IF(A2<48 000,A2*0.0 4,IF(A2<60 00,A2*0.05 ,A2*0.06)) )))
=IF(OR(A2<12000,A2>=60000)