Forum Discussion
tpiet
Apr 20, 2020Copper Contributor
Using a Cell Reference In Place of a Text String
I'm trying to create a table with a column that answers the question "Is this item seasonally available." I'm using a search formula =IFERROR(IF(SEARCH("*April*",[@Months],1),"Yes"),"No"). But I woul...
SergeiBaklan
Apr 21, 2020Diamond Contributor
As a comment, you don't need to add asterisks using SEARCH. To compare
=IF(ISNUMBER(SEARCH("April",[@Months])),"Yes","No")
and
=IF(COUNTIF([@Months],"*April*"),"Yes","No")
return the same.
If month name is in cell A1 that will be like
=IF(ISNUMBER(SEARCH($A$1,[@Months])),"Yes","No")
and
=IF(COUNTIF([@Months],"*" & $A$1 & "*"),"Yes","No")