I have been tasked with converting this formula into a user defined function in Excel. I haven't used index/match previously and have no experience with the functions so I am lost as how to convert. I was able to create a functions using a loop which returns the correct value but the data set it large so the process is slow. Can anyone help with getting this converted or with another method that may be more efficient to match six criteria and return the sum of amount?
=-IFERROR(SUMIFS(INDEX(Financials!$A:$M,,MATCH("Sum of Amount",Financials!$A$1:$M$1,0)),INDEX(Financials!$A:$M,,MATCH("Week Number",Financials!$A$1:$M$1,0)),MAX(INDEX(DateSelection!$A:$XDB,,MATCH("Week Number",DateSelection!$A$1:$XDB$1,0))),INDEX(Financials!$A:$M,,MATCH("Company Code",Financials!$A$1:$M$1,0)),Company,INDEX(Financials!$A:$M,,MATCH("Operations Statement Level",Financials!$A$1:$M$1,0)),$A9,INDEX(Financials!$A:$M,,MATCH("Activity Object",Financials!$A$1:$M$1,0)),"K.987084"),0)
Thanks for your help
Kristina
=-IFERROR(SUMIFS(INDEX(Financials!$A:$M,,MATCH("Sum of Amount",Financials!$A$1:$M$1,0)),INDEX(Financials!$A:$M,,MATCH("Week Number",Financials!$A$1:$M$1,0)),MAX(INDEX(DateSelection!$A:$XDB,,MATCH("Week Number",DateSelection!$A$1:$XDB$1,0))),INDEX(Financials!$A:$M,,MATCH("Company Code",Financials!$A$1:$M$1,0)),Company,INDEX(Financials!$A:$M,,MATCH("Operations Statement Level",Financials!$A$1:$M$1,0)),$A9,INDEX(Financials!$A:$M,,MATCH("Activity Object",Financials!$A$1:$M$1,0)),"K.987084"),0)
Thanks for your help
Kristina