Here I want the function f1() to create en excel formula and pass this formula to f2() without returning back to f1() and the f2() replaces function with the formula, while doing so I am getting compile error: Expected in line Sub f2( Optional endAll As Boolean = False, jR1 as Long, jC1 as Long, jGetFormula as String)
Sub f2( Optional endAll As Boolean = False, jR1 as Long, jC1 as Long, jGetFormula as String)
Cells(jR1, jC1) = Evaluate(jGetFormula)
If endAll Then Exit Function
End Sub
Function f1()
jGetFormula = "=A1*10^3*A2/148"
jR1 = Selection.Row
jC1 = Selection.Column
Call f2(True, jR1, jC1, jGetFormula)
End Function