I'm trying to make a formula with multiple criteria and wildcards that will return the matching category if found. I think this would be done through a robust Index-Match formula but I'm struggling to get all the criteria into a working formula. I'll explain better with examples...
I have two worksheets, sheet "Import Data" and sheet "Invoice Coding". The formula would be entered on sheet "Import Data", in any column off to the side, say formula goes into Column AD.
Here is the "Import Data" sheet:
Here is the "Invoicing Coding" sheet (there are over 500 rows and growing, so this is a small screenshot):
Step one would be to look for the "ACCT" number (Column O) from "Import Sheet" against the "Invoicing Coding" sheet, which would usually have multiple matches. Step two would then check the corresponding "INV" on the "Import Data" sheet and see if any of the wildcard invoices on sheet "Invoice Coding" match. The return would be the "Category" (Column D) from the "Invoice Coding" sheet.
I'll provide a specific example to try to explain better:
On this line, I want to use column O data, which is the number 50000.
Lookup 50000 on the "Invoice Coding" sheet, which has many results.
Then use the INV from Column D on the previous screenshot, which is...
To find if it has a partial match to the wildcards listed in Column C of the "Invoice Coding" sheet screenshot just above.
So in this specific example, the ACCT and INV from the "Import Data" sheet match row 178 on the "Invoice Coding" sheet. The expected result from the formula would be the Category from Column D; Third Party.
Here is what I have for a formula so far, which does not incorporate the partial invoice match using wildcards:
=INDEX('Invoice Coding'!A2:E514,MATCH('Import Data'!O2,'Invoice Coding'!A2:A514,0),4)
This technically returns a Category but it doesn't use the INV # vs the partial INV with wildcard, so the return may be incorrect.
I hope my explanation makes sense. Any advice on if I can enhance an Index-Match formula to include all the required criteria lookups?
As a side note, I would then repeat this formula with slight tweaks to also return the Sub-Category from Column E of the "Invoice Coding" sheet.
Thank you all so much in advance!
SUMPRODUCT
includingISNUMBER
,FIND
and the likes. – JvdVMATCH('Import Data'!D2,'Invoice Coding'!C2:C514,1)
or sumproduct for multiple matches as suggested by JvdV – NareshSUMPRODUCT
in a situation like this. Is that likely to be another nested statement within the formula I already have? – TBoulz{=INDEX('Invoice Coding'!E2:E656,MATCH(1,('Import Data'!O2='Invoice Coding'!A2:A656)*('Import Data'!D2='Invoice Coding'!C2:C656),0))}
. I appreciate the direction you provided, any idea how to include the wildcard, or if my array formula is all messed up? – TBoulz