Mac Numbers Categorize based on partial match
I presently use the following formula in Excel to categorize bank transactions by doing a partial match on the transaction descriptions. Unfortunately, this formula does not directly import from Excel to Numbers and being so, I was wondering if there is a way to either make it work in Numbers or achieve the same result by using a different formula. I understand that I can use the filter option in Numbers, however having a formula categorize into a cell would be preferred.
=INDEX(Categories!$B$2:$B$76,MATCH(TRUE,ISNUMBER(SEARCH(Categories!$A$2:$A$76,Transactions!G2)),0))
Categories!$B$2:$B$76 is the reference category range.
Categories!$A$2:$A$76 is the range of text to partial match for the applicable category.
Transactions!G2 is the transaction description the partial match matches against.