In Google Sheets I have my bank transactions list in column B, and I want to extract the supplier (business) name. This formula extracts the supplier name, but doesn't work when the company name on the bank transactions list is an abbreviation (shown in cell D3).
=ARRAYFORMULA(IFNA(REGEXEXTRACT(LOWER(B3:B), LOWER(TEXTJOIN("|", 1, SORT(F3:F, 1, 1))))))
So I've made a list of suppliers, with the company abbreviation in column F and the full company name in column G. Here's a link to the spreadsheet: https://docs.google.com/spreadsheets/d/1E7oZRxEr2Rkh-7nr3LaJ3jYmtvVi6J_lda1mGJbV7fw/edit?usp=sharing
How can I get the formula to check for full name, and if it doesn't find it then search for the company abbreviation? I tried using this IF function but it didn't work:
=if( ARRAYFORMULA(IFNA(REGEXEXTRACT(LOWER(B3:B), LOWER(TEXTJOIN("|", 1, SORT(G3:G, 1, 1)))))) <>"" , ARRAYFORMULA(IFNA(REGEXEXTRACT(LOWER(B3:B), LOWER(TEXTJOIN("|", 1, SORT(G3:G, 1, 1)))))) , ARRAYFORMULA(IFNA(REGEXEXTRACT(LOWER(B3:B), LOWER(TEXTJOIN("|", 1, SORT(F3:F, 1, 1)))))) )
try: