SOLVED

Formula not working - Return value in cell if another cell contains text from a list

Copper Contributor

I am trying to get a formula that would evaluate the cells in the column 'data' to see if they contain any of the words contained in the column 'List', then if true return the word "Groceries" or otherwise leave the cell blank in the 'Output' column. The formula I am using seems to work for the top cell only.

 

=IF(OR(COUNTIF(A2,"*"&$D$2:$D$4&"*")), "Groceries", "Nil")  

 

Can anyone help?

 

DataOutput List
ALDI STORES - NORTH RY   NORTH RYDE AUGroceries Aldi
Brewscape Cafe ForestvillRHODES       AUNil Coles
COLES 5791               MACQUARIE PK AUNil Woolworths
CarnivalFunPass          CARNEGIE     AUNil  
WOOLWORTHS/TOP RYDE CITY RYDE         AUNil  

 

2 Replies
best response confirmed by MattSmith1375 (Copper Contributor)
Solution

@MattSmith1375 

Your formula works in my Excel 2013 when it's entered as an arrayformula with ctrl+shift+enter. If we don't work with Office 365 or Excel for the web we have to enter arrayformulas with ctrl+shift+enter.

groceries.png

1 best response

Accepted Solutions
best response confirmed by MattSmith1375 (Copper Contributor)
Solution

@MattSmith1375 

Your formula works in my Excel 2013 when it's entered as an arrayformula with ctrl+shift+enter. If we don't work with Office 365 or Excel for the web we have to enter arrayformulas with ctrl+shift+enter.

groceries.png

View solution in original post