I am converting a large Macro to array format and need to convert the Sum & Xlookup functions to the equivalent. My issue is I need to XLookup across a row of columns, not a series of rows.
I keep getting stuck. This is what I've got so far but I know it's not right.
Help?!
VBA Code:
wsData.Range("N" & i).Formula = "=SUM(XLOOKUP(DATE(" & dtLaterFormat & "),Y1:BA1,Y" & i & ":BA" & i & "):XLOOKUP(TODAY(),Y1:BA1,Y" & i & ":BA" & i & "))"
I keep getting stuck. This is what I've got so far but I know it's not right.
Code:
With Application.WorksheetFunction
.Sum(.XLookup(dtLaterFormat, .Index(arr, 0, 1), .Index(arr, i, 2), "Not Found")
)
End With
Help?!