I have written a long If function in a Cell in an Excel 2003 worksheet.
I wish to add to it but, Excel is telling me that my function is too long.
Does anybody know how to simplify or reduce the length of the function?
In Column K3, I have a drop down list of Types of Defect, then this IF function is in column L3 to appear a specific Defect Description based on the Types of Defects selected in column K3.
=IF(ISTEXT(K3)=TRUE,IF(OR(K3="Abnormal Finishing",K3="Bending Mark",K3="Bent",K3="Contamination",K3="Crack",K3="Damage",K3="Dented",K3="Discoloration",K3="Finger Print",K3="Flow Mark",K3="Gap",K3="Insufficient Paint",K3="Scratches",K3="Rusty",K3="Stain Mark",K3="Standoff Mark",K3="Tool Mark",K3="Warpage",K3="Water Mark",K3="White Mark",K3="White Spot"),"Cosmetic",IF(OR(K3="Angle Out",K3="Dimension Out",K3="Fitting Problem"),"Dimension",IF(OR(K3="Assembly Misalignment",K3="Fan Broken",K3="Fan Not Functioning",K3="Assembly Wrong Orientation",K3="Missing Component",K3="Missing Rivet (Assembly)",K3="Part Warping (Assembly)",K3="Rivet Loose (Drop) (Assembly)",K3="Rivet Wrong Location (Assembly)",K3="Rivet Wrong Orientation (Assembly)",K3="Screw Loose (Drop)",K3="Screw Stuck"),"Assembly","ERROR"))),"ERROR")
A simple way would be to make separate lists and check if
K3exists in the list. For example make a list in any column (J here) foruse this formula to check if your value in K3 exists in this list
=IFERROR(MATCH(K3,J11:J14,0)>0,FALSE)J11:J14is my list. The formula results inTRUEorFALSEYour final formula would look like
where
L3:L7,M3:M7,N3:N7are lists for Domestic, Dimension and Assembly criteriaThis could be firther worked upon.