Tarik Hodzic
Tarik Hodzic

Reputation: 357

Using regexmatch to match part of a cell to values in a column to see there is a match

I have a column (Column A) of cells with tracking information. Each cell contains the date shipped and a tracking number. I have another column (Column B) with a bunch of tracking numbers. How can I see if the tracking number in column B match any of the tracking numbers in Column A?

This is what I have tried:

=IF(RegExMatch(A1, TO_TEXT(B:B)),"YES","NO") but that's not working

All of the results are coming back as "YES" even though there is no match. Any thoughts on this?

Upvotes: 1

Views: 988

Answers (1)

player0
player0

Reputation: 1

=ARRAYFORMULA(IF(LEN(B:B), IF(IFERROR(VLOOKUP(""&B:B, 
 IFERROR(REGEXEXTRACT(A:A, TEXTJOIN("|", 1, B:B))), 1, 0))<>"", "YES", "NO"), ))

0

Upvotes: 1

Related Questions