Spill error with IF function

%3CLINGO-SUB%20id%3D%22lingo-sub-2437854%22%20slang%3D%22en-US%22%3ESpill%20error%20with%20IF%20function%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-2437854%22%20slang%3D%22en-US%22%3E%3CP%3EWhen%20i%20added%20the%20following%20data%2C%26nbsp%3B%3DIF(%5BSpecialty%5D%3D%22Loans%22%2C%5BAccount%20Values%5D*0.0025%2C0)%20I%20keep%20getting%20a%20Spill%20error%20and%20I%20am%20unsure%20why.%20I%20was%20following%20my%20professors%20steps%20and%20for%20her%20it%20works%20fine.%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-LABS%20id%3D%22lingo-labs-2437854%22%20slang%3D%22en-US%22%3E%3CLINGO-LABEL%3EExcel%3C%2FLINGO-LABEL%3E%3CLINGO-LABEL%3EFormulas%20and%20Functions%3C%2FLINGO-LABEL%3E%3C%2FLINGO-LABS%3E%3CLINGO-SUB%20id%3D%22lingo-sub-2437875%22%20slang%3D%22en-US%22%3ERe%3A%20Spill%20error%20with%20IF%20function%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-2437875%22%20slang%3D%22en-US%22%3E%3CP%3E%3CA%20href%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F1076400%22%20target%3D%22_blank%22%3E%40Johann_six%3C%2FA%3E%26nbsp%3BYou%20can't%20use%20dynamic%20array%20formulae%20inside%20a%20%3CEM%3Estructured%3C%2FEM%3E%20table.%3C%2FP%3E%3CP%3ETry%20it%20this%20way%3A%3C%2FP%3E%3CP%3E%3CSPAN%3E%3DIF(%5B%3CFONT%20color%3D%22%23FF0000%22%3E%40%3C%2FFONT%3ESpecialty%5D%3D%22Loans%22%2C%5B%3CFONT%20color%3D%22%23FF0000%22%3E%40%3C%2FFONT%3EAccount%20Values%5D*0.0025%2C0)%3C%2FSPAN%3E%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3E%3CSPAN%3EIt%20will%26nbsp%3Bcalculate%20the%20Commission%20row-by-row%20in%20stead%20of%20trying%20to%20spill%20an%20array.%26nbsp%3B%3C%2FSPAN%3E%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-2438017%22%20slang%3D%22en-US%22%3ERe%3A%20Spill%20error%20with%20IF%20function%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-2438017%22%20slang%3D%22en-US%22%3E%3CP%3EA%20point%20of%20clarification%20-%20that%20type%20of%20formula%20used%20to%20work%20inside%20a%20structured%20table.%20But%2C%20when%20MS%20pushed%20the%20update%20for%20office%20365%20to%20implement%20dynamic%20array%20as%20the%20default%20formula%20evaluation%20method%2C%20it%20no%20longer%20works%20and%20you%20have%20to%20enter%20the%20formula%20as%20Riny%20indicated.%3CBR%20%2F%3E%3CBR%20%2F%3EI%20think%20that%20some%20teachers%20and%20textbooks%20are%20not%20up%20to%20date%20on%20the%20latest%20Excel%20version%2C%20so%20it%20is%20possible%20it%20may%20work%20for%20the%20instructor%2C%20but%20not%20the%20students%20(depending%20on%20what%20version%20each%20is%20using).%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EEdit%3A%20Though%20I%20think%20there%20should%20be%20an%20extra%20set%20of%20brackets%20around%20Account%20Values.%3C%2FP%3E%3CP%3E%3DIF(%5B%40Specialty%5D%3D%22Loans%22%2C%5B%40%5BAccount%20Values%5D%5D*0.0025%2C0)%3C%2FP%3E%3C%2FLINGO-BODY%3E
Occasional Visitor

When i added the following data, =IF([Specialty]="Loans",[Account Values]*0.0025,0) I keep getting a Spill error and I am unsure why. I was following my professors steps and for her it works fine.

2 Replies

@Johann_six You can't use dynamic array formulae inside a structured table.

Try it this way:

=IF([@Specialty]="Loans",[@Account Values]*0.0025,0)

 

It will calculate the Commission row-by-row in stead of trying to spill an array. 

A point of clarification - that type of formula used to work inside a structured table. But, when MS pushed the update for office 365 to implement dynamic array as the default formula evaluation method, it no longer works and you have to enter the formula as Riny indicated.

I think that some teachers and textbooks are not up to date on the latest Excel version, so it is possible it may work for the instructor, but not the students (depending on what version each is using).

 

Edit: Though I think there should be an extra set of brackets around Account Values.

=IF([@Specialty]="Loans",[@[Account Values]]*0.0025,0)