macro command for function key F9

New Contributor


I recorded a macro in Excel, one of the commands recorded in the macro was to calculate a formula (function key F9).

When I opened the macro for editing, this was the line that appeared in the editor:

ActiveCell.FormulaR1C1 = "2000"

("2000" is the calculated value of this particular formula - so written as an absolute value, instead of a command to calculate formula (F9).


is there any way to write/record this command in macro (Excel)?




3 Replies


If you want to recalculate the active cell:




If you want to recalculate all cells in the current selection:




If you want to recalculate the active worksheet:




If you want to recalculate the workbook:




If you want to recalculate all open workbooks:



@Hans Vogelaar 



Thank you!!!

sadly Im still having trouble with that (sorry, just beginner...)


I'm not sure what's the Command syntax.


this in my Macro:

ActiveCell.FormulaR1C1 = "The price is set"
ActiveCell.Offset(0, 8).Range("A1").Select
ActiveCell.FormulaR1C1 = "2000"
ActiveCell.Offset(0, -8).Range("A1").Select

End Sub


The yellow line is my problem...

can you please show me the full syntax in order to calculate the selected cell?





If both the active cell and the cell 8 columns to the right contain formulas:


    ActiveCell.Offset(0, 8).Calculate