In B3 QUERY, where AN contains results that start from NSE:MOL, G1 is the same name and words that start from NSE:MOLDTKPAC So the result is a mismatch because I got two entries in b3 and b4, which means b3 should not be there. The issue is that only the starting words are the same. Is there any solution? Test File
one more thing match words also not worked out coz i have take all which is like NSE:MMTC:F0004 NSE:MMTC:F0002 NSE:MMTC:F000 manymore
Try replacing this part of the formula
AN contains '"&B1&"'
with
AN matches '"&B1&"\b'
\b
establishes a word_boudary check to the right end