Need Help wih an IF formula

G

Guest

I have been trying the IF formula and i am stuck.

EX. if(logic,true,false)got that
a1=1
a2=$20

IF(.01<=a2<=.99,a1*.2,0)andIF(1<=a2<=9.99,a1*.4,0)andIF(10<=a2<=24.99,a1*.60,0).................

i cant figure a formula
help please
plus if a2=1-25 at 5.25%,if a2=25.01-50 than 25 at 5.25%plus 25.01-50 at
3.75%...................
 
G

Guest

The function andif is not known to me
but if you like you can do it like this:
i always use nested formula's

=IF(AND(0.01<=B1,B1<=0.99),A1*0.2,IF(AND(1<=B1,
B1<=9.99),A1*0.4,IF(AND((10<= B1), (B1<=24)),A1*0.6,"out of range")))

and if you would like to add a 4th range you can type the formula instead of
"out of range"

IF(AND(25<=B1,B1<=49.99),A1*0.8,"out of range")

and of course instead of the fixed limits 0.01, 0.99 etc and the percentages
0.2, 0.4 etc. you can enter cells with a variable in it

With kind regards,
JW
 
M

macropod

Hi Stumblee,

Try:
=((A2<1)+(A2<10)+(A2<25)*28)*A2*2
and
=((A2>0)*5.25%*A2-(A2>25)*1.5%*(A2-25)

Cheers
 
G

Guest

Hi Brian:

I think the first one can be evaluated as:

=(A2>0)*(A2<1)*(A1*0.2)+(A2>=1)*(A2<10)*(A1*0.4)+(A2>=10)*(A2<25)*(A1*0.6)

if the number a2 is within the limits if between say between 0 and less then
25 you could reduce the checked as:

=((a2<1)+(a2<10)+(a2<25))*0.2*a1

ie just incrementing the percentage...

And the second one ( I put an extra one on the end to show how it works):

=(A2>=1)*MIN(A2,25)*0.0525+(A2>25)*MIN(A2-25,25)*0.0375+(A2>50)*MIN(A2-50,25)*0.0125
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top