Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 1
Default Need Help wih an IF formula

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%...................
--
or a book with diff formulas
Brian
  #2   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 4
Default Need Help wih an IF formula

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

"Stumblee" wrote:

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%...................
--
or a book with diff formulas
Brian

  #3   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 329
Default Need Help wih an IF formula

Hi Stumblee,

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

Cheers
--
macropod
[MVP - Microsoft Word]
-------------------------

"Stumblee" (donotspan) wrote in message ...
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%...................
--
or a book with diff formulas
Brian

  #4   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 694
Default Need Help wih an IF formula

Hi Brian:

I think the first one can be evaluated as:

=(A20)*(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+(A225)*MIN(A2-25,25)*0.0375+(A250)*MIN(A2-50,25)*0.0125
--
Hope this helps
Martin Fishlock, Bangkok, Thailand
Please do not forget to rate this reply.


"Stumblee" wrote:

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%...................
--
or a book with diff formulas
Brian

Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On



All times are GMT +1. The time now is 09:58 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"