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
Let me try these
PeterBartholomew1
Oct 29, 2021Silver Contributor
A further thought. Are your codes exactly "RD*" or do they include other characters, e.g. RD123?
If the latter, you will need to use the LEFT function or even SEARCH.