I'm trying to do either one of the formulas below in VBA using the Application.WorksheetFunction but am having difficulty with the asterisk as part of the worksheet function:

MAX(ROW(A:A)*(A:A<>""))
or

SUMPRODUCT(MAX((ROW(A1:A10000))*(A1:A10000<>"")))
I think the second formula, once changed over to VB code, might need Application.WorksheetFunction.FormulaArray() as well.