bad if error code..

bad if error code..

roscopeco2000
Collaborator Collaborator
583 Views
2 Replies
Message 1 of 3

bad if error code..

roscopeco2000
Collaborator
Collaborator

Hello i am setting up a parameter that will report lintel length each value is a brick course then the corresponding lintel length is reported. I keep getting either bad if statements messages or unexpected parenthesis messages can anyone see anything obvious?   

 

if(Width < 1810 mm, 2250 mm, if(Width <1922.5 mm, 2250 mm, if(Width < 2035 mm, 2400 mm, if(Width < 2147.5 mm, 2550 mm, if(Width < 2260 mm, 2700 mm, if(Width < 2372.5 mm, 2700 mm, if(Width < 2485 mm, 2850 mm, if(Width < 2597.5 mm, 3000 mm, if(Width < 2710 mm, 3150 mm, if(Width < 2822.5 mm, 3150 mm, if(Width < 2935 mm, 3300 mm, if(Width < 3047.5 mm, 3450 mm, if(Width < 3160 mm, 3600 mm, if(Width < 3272.5 mm, 3600mm, if(Width < 3385 mm, 3750mm, if(Width < 3497.5 mm, 3900mm, if(Width < 3610 mm, 4050mm, if(Width < 3722.5 mm, 4050mm, if(Width < 3835 mm, 4200mm, if(Width < 3947.5 mm, 4350mm, if(Width < 4060 mm, 4500mm, if(Width < 4172.5 mm, 4500mm, if(Width < 4285 mm, 4650mm, if(Width < 4397.5 mm, 4800mm, if(Width < 4510 mm, 4950mm, if(Width < 4622.5mm, 4950mm))))))))))))))))))))))))))

0 Likes
Accepted solutions (1)
584 Views
2 Replies
Replies (2)
Message 2 of 3

barthbradley
Consultant
Consultant

I don't think it's long enough. Try nesting a few more IF statements. 

 

 

Message 3 of 3

ToanDN
Consultant
Consultant
Accepted solution

The last IF is missing a factor. 

 

Nested IF statements
IF ( Length < 500 , 100 , IF ( Length < 750 , 200 , IF ( Length < 1000 , 300 , 400 ) ) )