Question: how to insert formula in excel sheet using vba?
Answer: Turn on the macro recorder (Developer tab > Record Macro) Type your formula or edit an existing formula. Press Enter to enter the formula. The code is created in the macro.