#1   Report Post  
Posted to microsoft.public.excel.misc
BThrasher
 
Posts: n/a
Default IF Statement useage

I have the folowing IF statment that works well.

in "P11"
=IF(M11=90,10,IF(M11=100,20,IF(M11=110,30,IF(M11=1 20,40,IF(M11=130,50,IF(M11=140,60,IF(M11=150,70,IF (M11159,80,))))))))

The value in P11 can be from 10 to 80 based on that statment. I have tried
to add in the front of the IF statment "IF(M11=0,0," making it like this
=IF(M11=0,0,IF(M11=90,10,IF(M11=100,20,IF(M11=110, 30,IF(M11=120,40,IF(M11=130,50,IF(M11=140,60,IF(M1 1=150,70,IF(M11159,80,)))))))))
and it always fails with an error. What am I doing wrong?
  #2   Report Post  
Posted to microsoft.public.excel.misc
Bondi
 
Posts: n/a
Default IF Statement useage

Hi,

This might help:

http://www.cpearson.com/excel/nested.htm

Regards,
Bondi

  #3   Report Post  
Posted to microsoft.public.excel.misc
BThrasher
 
Posts: n/a
Default IF Statement useage

Thanks I did not know it was limited to 7 deep.
bob

"Bondi" wrote:

Hi,

This might help:

http://www.cpearson.com/excel/nested.htm

Regards,
Bondi


  #4   Report Post  
Posted to microsoft.public.excel.misc
Bob Phillips
 
Posts: n/a
Default IF Statement useage

=IF(M11159,80,IF(OR(M11<90,MOD(M11,10)<0),0*(M11/10-8)*10))

--
HTH

Bob Phillips

(remove xxx from email address if mailing direct)

"BThrasher" wrote in message
...
I have the folowing IF statment that works well.

in "P11"

=IF(M11=90,10,IF(M11=100,20,IF(M11=110,30,IF(M11=1 20,40,IF(M11=130,50,IF(M11
=140,60,IF(M11=150,70,IF(M11159,80,))))))))

The value in P11 can be from 10 to 80 based on that statment. I have tried
to add in the front of the IF statment "IF(M11=0,0," making it like this

=IF(M11=0,0,IF(M11=90,10,IF(M11=100,20,IF(M11=110, 30,IF(M11=120,40,IF(M11=13
0,50,IF(M11=140,60,IF(M11=150,70,IF(M11159,80,))) ))))))
and it always fails with an error. What am I doing wrong?



  #5   Report Post  
Posted to microsoft.public.excel.misc
Bernard Liengme
 
Posts: n/a
Default IF Statement useage

The problem is that Excel permits up to 7 level of nesting
Generally one use a lookup formula (see Help on VLOOKUP) when an IF cannot
accommodate all the choices
But in your case you could use =IF(M11=0,0,IF(M11159,80,M11-80))
or =IF(M11=0,0,MAX(80,M11-80))
Not clear what you want when M11 is , for example, 145.
best wishes
--
Bernard V Liengme
www.stfx.ca/people/bliengme
remove caps from email

"BThrasher" wrote in message
...
I have the folowing IF statment that works well.

in "P11"
=IF(M11=90,10,IF(M11=100,20,IF(M11=110,30,IF(M11=1 20,40,IF(M11=130,50,IF(M11=140,60,IF(M11=150,70,IF (M11159,80,))))))))

The value in P11 can be from 10 to 80 based on that statment. I have tried
to add in the front of the IF statment "IF(M11=0,0," making it like this
=IF(M11=0,0,IF(M11=90,10,IF(M11=100,20,IF(M11=110, 30,IF(M11=120,40,IF(M11=130,50,IF(M11=140,60,IF(M1 1=150,70,IF(M11159,80,)))))))))
and it always fails with an error. What am I doing wrong?





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


Similar Threads
Thread Thread Starter Forum Replies Last Post
SET statement tutorial Daminc Excel Discussion (Misc queries) 13 January 17th 06 04:47 PM
If statement Matt Montagliano Excel Discussion (Misc queries) 1 September 8th 05 08:47 PM
Do I need a sumif or sum of a vlookup formula? PeterB Excel Worksheet Functions 0 June 1st 05 12:23 PM
How to calculate a sum as one outcome of an IF statement barb in NC Excel Worksheet Functions 2 March 31st 05 08:01 PM
7+ nested if statement? Turi Excel Worksheet Functions 3 December 20th 04 07:55 PM


All times are GMT +1. The time now is 05:17 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"