Hello,
You may be able to use cell references depending on how you are defining the values for &A1& and &A2&, inside Excel or somehow external to Excel. If you can use cell reference then you can place the values for &A1& and &A2& in some hidden cells and use the reference to those cells in your formula.
Best Regards,
Leila