Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 6
Default Something is wrong with this IF statment

if(AS31100,73,if(as31000,77,if(as3900,82,if(as3 800,82,if(as3700,84,if(as3600,77,if(as3500,80, if(as3400,85.1,if(as3300,83.4,if(as3200,89.8,if (as3100,103,if(as30,103,0))))))))))))

Does Office cutout after too many nested if? when i click ok on the error it
higlights my 6th last if. If i delete all ifs after and make the 6th last
the last if, it works fine... it also doesn't highlight my as3 reference
after the 6th last if...
  #2   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 3
Default Something is wrong with this IF statment

Yes... Excel has that limit and it is the reason for it not working...

bastien86 wrote:
if(AS31100,73,if(as31000,77,if(as3900,82,if(as3 800,82,if(as3700,84,if(as3600,77,if(as3500,80, if(as3400,85.1,if(as3300,83.4,if(as3200,89.8,if (as3100,103,if(as30,103,0))))))))))))

Does Office cutout after too many nested if? when i click ok on the error it
higlights my 6th last if. If i delete all ifs after and make the 6th last
the last if, it works fine... it also doesn't highlight my as3 reference
after the 6th last if...


  #3   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 8,856
Default Something is wrong with this IF statment

You could replace all those IFs by using VLOOKUP. Set up this small
table somewhere (eg in cells X1 to Y12 in the same sheet as your
formula):

0.01 103
100.01 103
200.01 89.8
300.01 83.4
400.01 85.1
500.01 80
600.01 77
700.01 84
800.01 82
900.01 82
1000.01 77
1100.01 73

Then replace your formula with this:

=IF(AS3=0,0,VLOOKUP(AS3,X$1:Y$12,2,1))

This should give you what you want. the ".01" added on to each initial
number ensures that AS3 has to be larger than the integer - you can
make this 0.1 or 0.000001, depending on the values that AS3 can take.

Hope this helps.

Pete

bastien86 wrote:
if(AS31100,73,if(as31000,77,if(as3900,82,if(as3 800,82,if(as3700,84,if(as3600,77,if(as3500,80, if(as3400,85.1,if(as3300,83.4,if(as3200,89.8,if (as3100,103,if(as30,103,0))))))))))))

Does Office cutout after too many nested if? when i click ok on the error it
higlights my 6th last if. If i delete all ifs after and make the 6th last
the last if, it works fine... it also doesn't highlight my as3 reference
after the 6th last if...


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
###### Wrong Formula Ningster Excel Discussion (Misc queries) 8 July 8th 06 01:09 AM
How do I recover data that somebody pasted over on the wrong page Randy Excel Discussion (Misc queries) 2 July 2nd 06 01:29 AM
SUMPRODUCT is showing wrong Amount msbutton27 Excel Discussion (Misc queries) 2 January 25th 06 03:40 PM
hyperlink navigation path path wrong in Excel 2003 CE Admin Excel Discussion (Misc queries) 5 January 7th 06 07:47 PM
wrong year Jeffrey Excel Worksheet Functions 1 November 15th 05 09:29 AM


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