Forum Discussion
ChidiV
Oct 28, 2021Copper Contributor
#SPILL
Hi Everyone, I have this formula =IF([Article Base Code] ="RD*","DAIRY",IF([Article Base Code] ="CS*","PIGS")) I am getting #SPILL ERROR Please help
- Oct 29, 2021
ChidiV Wait!! YOu can't use the wild card match that way in an IF function.
Try it this way:
=IF(COUNTIF([@Article Base Code],"RD*"),"DAIRY",IF(COUNTIF([@Article Base Code],"CS*"),"PIGS"))
ChidiV
Oct 29, 2021Copper Contributor
=IF([@[Article Base Code]] ="RD*","DAIRY",IF([@[Article Base Code]] ="CS*","PIGS"))
It doesnt seem to work either.
It doesnt seem to work either.
Riny_van_Eekelen
Oct 29, 2021Platinum Contributor
ChidiV Sorry! I put the @ sign in the wrong place. It should by inside the square brackets. Try this:
=IF([@Article Base Code] ="RD*","DAIRY",IF([@Article Base Code] ="CS*","PIGS"))
- ChidiVOct 29, 2021Copper ContributorTried it, at least there'
s no error now. But my results are wrong even with the correct logic.- Riny_van_EekelenOct 29, 2021Platinum Contributor
ChidiV Sorry, but I can't judge what is "wrong" if you don't share the file, or at least part of it, after removing any private or confidential information.
- ChidiVOct 29, 2021Copper ContributorI'll share the file cause im at frustration level