J
JeffJ
Using Excel 2000, I have two worksheets in the same workbook.
I'm going to hide and protect the second worksheet (which I have named
"FORMULAS"), so that only the first worksheet will be visible (which I
have named "SALESFORM"). The "FORMULAS" sheet will contain the IF
function formulas in it's cells, but they will be referencing the
matching cells on the "SALESFORM" sheet.
The purpose of this is so people can type in data on the "SALESFORM"
sheet, and not have to worry about accidently deleting the formulas
(since they will be on the other sheet, which is hidden and protected).
In order to do this, I type in SALESFORM! before each of the cell
references, so that it refers/points to the cells on the SALESFORM
sheet, not on the FORMULAS sheet. Interestingly, after I save it, it
always replaces the word SALESFORM! with the name of the workbook.
(All this has worked fine except for one particular formula, which is
too long. I have similar formulas elsewhere, and they are working
fine, but they are much shorter.)
One cell I have renamed "MODEL". When you enter a Model number into
this cell, it will bring up a description and a base price.
I have 3 other cells, named "ZONE_I", "ZONE_II" and "ZONE_III",
respectively. When you place and "X" in one of these cells, it will
bring up a monetary amount to either add or subtract to or from that
base price, depending on where you place the "X".
If I place my IF function formula in one cell, Excel says my formula is
too long. Therefore, I'm trying to split the formula into 2, 3, or
maybe even 4 cells. I've split it into 3 separate formulas, but the
1st and 3rd formula returns FALSE (I want it to be blank unless
something is typed into the MODEL cell and an "X" is placed in either
the ZONE_I, ZONE_II or ZONE_III cells).
First, just to give you an idea, here is an example of one of the
formulas that is working correctly (notice that it replaced every
occurance of SALESFORM! with the name of the workbook, 'LEXINGTON_Sept
15 Pricing.xls'!.....This is not a problem, but I'm just curious as to
why it does this):
=IF(AND('LEXINGTON_Sept 15 Pricing.xls'!ZONE_I="X",'LEXINGTON_Sept 15
Pricing.xls'!MODEL>0),-900,IF(AND('LEXINGTON_Sept 15
Pricing.xls'!ZONE_II="X",'LEXINGTON_Sept 15
Pricing.xls'!MODEL>0),"INCL",IF('LEXINGTON_Sept 15
Pricing.xls'!ZONE_III="X",1040," ")))
Now, here is the formula I'm having a problem with:
ORIGINAL FORMULA (EXCEL SAYS THIS IS TOO LONG):
=IF(AND(ZONE_I="X",MODEL>0),IF(OR(MODEL="2465CT",MODEL="2466CT",MODEL="2467CT",MODEL="2458CT",MODEL="2465CTH",MODEL="2466CTH",MODEL="2463CTH",MODEL="2458CTH",MODEL="2464CTH",MODEL="2550CT",MODEL="2567CT",MODEL="2463CTP",MODEL="2458CTP",MODEL="2464CTP",MODEL="2522CT",MODEL="2530CT"),-850,IF(OR(MODEL="2525CT",MODEL="2526CT",MODEL="2527CT",MODEL="2528CT",MODEL="4301CT",MODEL="4302CT"),-900,IF(OR(MODEL="2553CT",MODEL="2554CT",MODEL="2560CT",MODEL="2561CT",MODEL="2523CT",MODEL="2531CT"),-950))),IF(ZONE_II="X","INCL",IF(AND(ZONE_III="X",MODEL>0),IF(OR(MODEL="2465CT",MODEL="2466CT",MODEL="2467CT",MODEL="2458CT",MODEL="2465CTH",MODEL="2466CTH",MODEL="2463CTH",MODEL="2458CTH",MODEL="2464CTH",MODEL="2567CT",MODEL="2463CTP",MODEL="2458CTP",MODEL="2464CTP",MODEL="2522CT",MODEL="2530CT"),845,IF(OR(MODEL="2550CT",MODEL="2553CT",MODEL="2554CT",MODEL="2560CT",MODEL="2561CT",MODEL="2523CT",MODEL="2531CT",MODEL="4301CT",MODEL="4302CT"),1040,IF(OR(MODEL="2525CT",MODEL="2526CT",MODEL="2527CT",MODEL="2528CT"),995))),"
")))
FORMULA SPLIT INTO 3 PARTS:
PART I (first cell): This returns FALSE; I want it to be blank unless
an "X" is placed in Zone I.
=IF(AND(SALESFORM!ZONE_I="X",SALESFORM!MODEL>0),IF(OR(SALESFORM!MODEL="2465CT",SALESFORM!MODEL="2466CT",SALESFORM!MODEL="2467CT",SALESFORM!MODEL="2458CT",SALESFORM!MODEL="2465CTH",SALESFORM!MODEL="2466CTH",SALESFORM!MODEL="2463CTH",SALESFORM!MODEL="2458CTH",SALESFORM!MODEL="2464CTH",SALESFORM!MODEL="2550CT",SALESFORM!MODEL="2567CT",SALESFORM!MODEL="2463CTP",SALESFORM!MODEL="2458CTP",SALESFORM!MODEL="2464CTP",SALESFORM!MODEL="2522CT",SALESFORM!MODEL="2530CT"),"-850",IF(OR(SALESFORM!MODEL="2525CT",SALESFORM!MODEL="2526CT",SALESFORM!MODEL="2527CT",SALESFORM!MODEL="2528CT",SALESFORM!MODEL="4301CT",SALESFORM!MODEL="4302CT"),"-900",IF(OR(SALESFORM!MODEL="2553CT",SALESFORM!MODEL="2554CT",SALESFORM!MODEL="2560CT",SALESFORM!MODEL="2561CT",SALESFORM!MODEL="2523CT",SALESFORM!MODEL="2531CT"),"-950","
"))))
PART II (second cell): This one seems fine, possibly because it is not
too long. I'm wondering if the other two formulas are simply too
long.
=IF(AND(SALESFORM!ZONE_II="X",SALESFORM!MODEL>0),"INCL"," ")
PART III(third cell): This also returns FALSE; I want it to be blank
unless an "X" is placed in Zone III.
=IF(AND(SALESFORM!ZONE_III="X",SALESFORM!MODEL>0),IF(OR(SALESFORM!MODEL="2465CT",SALESFORM!MODEL="2466CT",SALESFORM!MODEL="2467CT",SALESFORM!MODEL="2458CT",SALESFORM!MODEL="2465CTH",SALESFORM!MODEL="2466CTH",SALESFORM!MODEL="2463CTH",SALESFORM!MODEL="2458CTH",SALESFORM!MODEL="2464CTH",SALESFORM!MODEL="2567CT",SALESFORM!MODEL="2463CTP",SALESFORM!MODEL="2458CTP",SALESFORM!MODEL="2464CTP",SALESFORM!MODEL="2522CT",SALESFORM!MODEL="2530CT"),"845",IF(OR(SALESFORM!MODEL="2550CT",SALESFORM!MODEL="2553CT",SALESFORM!MODEL="2554CT",SALESFORM!MODEL="2560CT",SALESFORM!MODEL="2561CT",SALESFORM!MODEL="2523CT",SALESFORM!MODEL="2531CT",SALESFORM!MODEL="4301CT",SALESFORM!MODEL="4302CT"),"1040",IF(OR(SALESFORM!MODEL="2525CT",SALESFORM!MODEL="2526CT",SALESFORM!MODEL="2527CT",SALESFORM!MODEL="2528CT"),"995",""))))
I'm going to hide and protect the second worksheet (which I have named
"FORMULAS"), so that only the first worksheet will be visible (which I
have named "SALESFORM"). The "FORMULAS" sheet will contain the IF
function formulas in it's cells, but they will be referencing the
matching cells on the "SALESFORM" sheet.
The purpose of this is so people can type in data on the "SALESFORM"
sheet, and not have to worry about accidently deleting the formulas
(since they will be on the other sheet, which is hidden and protected).
In order to do this, I type in SALESFORM! before each of the cell
references, so that it refers/points to the cells on the SALESFORM
sheet, not on the FORMULAS sheet. Interestingly, after I save it, it
always replaces the word SALESFORM! with the name of the workbook.
(All this has worked fine except for one particular formula, which is
too long. I have similar formulas elsewhere, and they are working
fine, but they are much shorter.)
One cell I have renamed "MODEL". When you enter a Model number into
this cell, it will bring up a description and a base price.
I have 3 other cells, named "ZONE_I", "ZONE_II" and "ZONE_III",
respectively. When you place and "X" in one of these cells, it will
bring up a monetary amount to either add or subtract to or from that
base price, depending on where you place the "X".
If I place my IF function formula in one cell, Excel says my formula is
too long. Therefore, I'm trying to split the formula into 2, 3, or
maybe even 4 cells. I've split it into 3 separate formulas, but the
1st and 3rd formula returns FALSE (I want it to be blank unless
something is typed into the MODEL cell and an "X" is placed in either
the ZONE_I, ZONE_II or ZONE_III cells).
First, just to give you an idea, here is an example of one of the
formulas that is working correctly (notice that it replaced every
occurance of SALESFORM! with the name of the workbook, 'LEXINGTON_Sept
15 Pricing.xls'!.....This is not a problem, but I'm just curious as to
why it does this):
=IF(AND('LEXINGTON_Sept 15 Pricing.xls'!ZONE_I="X",'LEXINGTON_Sept 15
Pricing.xls'!MODEL>0),-900,IF(AND('LEXINGTON_Sept 15
Pricing.xls'!ZONE_II="X",'LEXINGTON_Sept 15
Pricing.xls'!MODEL>0),"INCL",IF('LEXINGTON_Sept 15
Pricing.xls'!ZONE_III="X",1040," ")))
Now, here is the formula I'm having a problem with:
ORIGINAL FORMULA (EXCEL SAYS THIS IS TOO LONG):
=IF(AND(ZONE_I="X",MODEL>0),IF(OR(MODEL="2465CT",MODEL="2466CT",MODEL="2467CT",MODEL="2458CT",MODEL="2465CTH",MODEL="2466CTH",MODEL="2463CTH",MODEL="2458CTH",MODEL="2464CTH",MODEL="2550CT",MODEL="2567CT",MODEL="2463CTP",MODEL="2458CTP",MODEL="2464CTP",MODEL="2522CT",MODEL="2530CT"),-850,IF(OR(MODEL="2525CT",MODEL="2526CT",MODEL="2527CT",MODEL="2528CT",MODEL="4301CT",MODEL="4302CT"),-900,IF(OR(MODEL="2553CT",MODEL="2554CT",MODEL="2560CT",MODEL="2561CT",MODEL="2523CT",MODEL="2531CT"),-950))),IF(ZONE_II="X","INCL",IF(AND(ZONE_III="X",MODEL>0),IF(OR(MODEL="2465CT",MODEL="2466CT",MODEL="2467CT",MODEL="2458CT",MODEL="2465CTH",MODEL="2466CTH",MODEL="2463CTH",MODEL="2458CTH",MODEL="2464CTH",MODEL="2567CT",MODEL="2463CTP",MODEL="2458CTP",MODEL="2464CTP",MODEL="2522CT",MODEL="2530CT"),845,IF(OR(MODEL="2550CT",MODEL="2553CT",MODEL="2554CT",MODEL="2560CT",MODEL="2561CT",MODEL="2523CT",MODEL="2531CT",MODEL="4301CT",MODEL="4302CT"),1040,IF(OR(MODEL="2525CT",MODEL="2526CT",MODEL="2527CT",MODEL="2528CT"),995))),"
")))
FORMULA SPLIT INTO 3 PARTS:
PART I (first cell): This returns FALSE; I want it to be blank unless
an "X" is placed in Zone I.
=IF(AND(SALESFORM!ZONE_I="X",SALESFORM!MODEL>0),IF(OR(SALESFORM!MODEL="2465CT",SALESFORM!MODEL="2466CT",SALESFORM!MODEL="2467CT",SALESFORM!MODEL="2458CT",SALESFORM!MODEL="2465CTH",SALESFORM!MODEL="2466CTH",SALESFORM!MODEL="2463CTH",SALESFORM!MODEL="2458CTH",SALESFORM!MODEL="2464CTH",SALESFORM!MODEL="2550CT",SALESFORM!MODEL="2567CT",SALESFORM!MODEL="2463CTP",SALESFORM!MODEL="2458CTP",SALESFORM!MODEL="2464CTP",SALESFORM!MODEL="2522CT",SALESFORM!MODEL="2530CT"),"-850",IF(OR(SALESFORM!MODEL="2525CT",SALESFORM!MODEL="2526CT",SALESFORM!MODEL="2527CT",SALESFORM!MODEL="2528CT",SALESFORM!MODEL="4301CT",SALESFORM!MODEL="4302CT"),"-900",IF(OR(SALESFORM!MODEL="2553CT",SALESFORM!MODEL="2554CT",SALESFORM!MODEL="2560CT",SALESFORM!MODEL="2561CT",SALESFORM!MODEL="2523CT",SALESFORM!MODEL="2531CT"),"-950","
"))))
PART II (second cell): This one seems fine, possibly because it is not
too long. I'm wondering if the other two formulas are simply too
long.
=IF(AND(SALESFORM!ZONE_II="X",SALESFORM!MODEL>0),"INCL"," ")
PART III(third cell): This also returns FALSE; I want it to be blank
unless an "X" is placed in Zone III.
=IF(AND(SALESFORM!ZONE_III="X",SALESFORM!MODEL>0),IF(OR(SALESFORM!MODEL="2465CT",SALESFORM!MODEL="2466CT",SALESFORM!MODEL="2467CT",SALESFORM!MODEL="2458CT",SALESFORM!MODEL="2465CTH",SALESFORM!MODEL="2466CTH",SALESFORM!MODEL="2463CTH",SALESFORM!MODEL="2458CTH",SALESFORM!MODEL="2464CTH",SALESFORM!MODEL="2567CT",SALESFORM!MODEL="2463CTP",SALESFORM!MODEL="2458CTP",SALESFORM!MODEL="2464CTP",SALESFORM!MODEL="2522CT",SALESFORM!MODEL="2530CT"),"845",IF(OR(SALESFORM!MODEL="2550CT",SALESFORM!MODEL="2553CT",SALESFORM!MODEL="2554CT",SALESFORM!MODEL="2560CT",SALESFORM!MODEL="2561CT",SALESFORM!MODEL="2523CT",SALESFORM!MODEL="2531CT",SALESFORM!MODEL="4301CT",SALESFORM!MODEL="4302CT"),"1040",IF(OR(SALESFORM!MODEL="2525CT",SALESFORM!MODEL="2526CT",SALESFORM!MODEL="2527CT",SALESFORM!MODEL="2528CT"),"995",""))))