I'm certainly not a programmer but here's a thought that may be helpful: Use a case statement instead of an if than else statement. Below is a possible structure - warning - the syntax may not be correct... but it is something like this.
Select Case nPlanned
Case 1
nPlanned <= 600
then
n20560Qty = 500
Case 2
nPlanned > 600 and nPlanned <= 900
then
n20561Qty = 500
Case 3
nPlanned > 900 and nPlanned <= 1100
then
n20560Qty = 1000
Case 4
nPlanned > 1101 and nPlanned <= 1300
then
n20560Qty = 500 and n20561Qty = 800
Case Else
nPlanned > 1301 and nPlanned <= 1500
then
n20560Qty = 1500
End Select
------------------------------
Doug Higgs
Assistant Technical Support / Building Maintenance Specialist
Midwest Commerce Solutions, Inc
------------------------------