First time poster here.
I currently have a spreadsheet with 2 columns of data; one with a list of stock tickers (column B), and the other with their corresponding industries (column C). I want to use a formula to return a new list of tickers whose industries match either of the two specified in column J: 'Packaged Software' or 'Information Technology Services.'
In columns E and F, I have created this list according to each criterion separately, which works as intended by entering the formulas below in cells E2 & F2, respectively, and dragging down.
{=IFERROR(INDEX($B:$B,SMALL(IF($C:$C=$J$2,ROW($B:$B)),ROW(1:1)),1,1),"")} {=IFERROR(INDEX($B:$B,SMALL(IF($C:$C=$J$3,ROW($B:$B)),ROW(1:1)),1,1),"")}
However, the issue occurs in column G when I try to combine the two using an IF(OR() statement in cell G2, as shown below.
{=IFERROR(INDEX($B:$B,SMALL(IF(OR($C:$C=$J$2,$C:$C=$J$3),ROW($B:$B)),ROW(2:2)),1,1),"")}
As you can see in the first image, this formula returns the entire list of companies rather than just those that fit either of the two criteria. I have reviewed many similar examples but none seem to solve the persistent problem I am encountering, including an old question on this forum titled, "Return list of all values that match any of a few criteria". I adapted this formula from that post and have played around with it thoroughly, but I cannot seem to get it to work properly in my spreadsheet for some reason.
If anyone can offer assistance, it would be greatly appreciated; thank you.