MrExcel Publishing
Your One Stop for Excel Tips & Solutions

complex really need help from you.


Posted by rmilko on February 11, 2002 7:39 AM

I'm workin' on a value for a withholding tax.

I need to know how to get an auto-value if the salary range is...let's say, Range: 1000-2000 value is 10% of the exact amount in that range. So that whenever I put an amount in that range say, 1,875. an auto value for that range 1000-2000 will automatically generate please provide a sample code and if u can pls email me thank you very much.



Posted by Chris D on February 11, 2002 11:44 AM

if A1 houses your input value, try this in B1 :

=IF(AND(A1>=1000,A1<=2000),A1*10%,A1)

which returns 10% if it's within that range, and returns the original number if not..... play around with it as needed

if you're about to extend this to a table of salary ranges and their associated %ages, you might be better of using a LOOKUP function, just shout if this is so...

hope this helps
Chris