This is my formula in excel which I got the result right,
SUMPRODUCT((('BS GL Balance'!$E:$E="Report")*1),(('BS GL Balance'!$F:$F="Report")*1),(('BS GL Balance'!$C:$C="EUR")*1),INDEX('BS GL Balance'!$A:$AH,,MATCH('CRR0100'!$C220,'BS GL Balance'!$1:$1,0)))
Now I need the cell to compute it instead of displaying the formula,
Cells(xNum, 5).value = WorksheetFunction.SumProduct(((wsBSG.Range("E:E") = "Report") * 1), ((wsBSG.Range("F:F") = "Report") * 1), ((wsBSG.Range("C:C") = "EUR") * 1), WorksheetFunction.Index(wsBSG.Range("A:XFD"), , WorksheetFunction.Match(Cells(xNum, 3), wsBSG.Range("1:1"), False)))
I got an error on this, "Argument not optional", can someone correct where I am wrong.
Bookmarks