Basically to get your desired output, instead of nesting each IF statement within each other, you need to write them separately and combine the output.
You can use TextJoin
to do that. Check the formula below:
=TEXTJOIN(", ",TRUE,
IF(COUNTIF(A1,"*car*")>0,"Cars are big",""),
IF(COUNTIF(A1,"*flowers*")>0,"Flowers are beautiful",""),
IF(COUNTIF(A1,"*tree*")>0,"Trees are Green","")
)
Here each condition is evaluated separately and all of the results are joined into one text string. The TRUE
in the formula denotes if you want to ignore empty values.
Below is an example of the output:
CLICK HERE to find out more related problems solutions.