How to Make a Recalculate Button in Excel (with Easy Steps)

The Recalculate button calculates the formula you entered in your dataset. Whenever you use a volatile function that changes with the span of time, then you may need to recalculate the formula. You can do this with the click of a button utilizing VBA macros. If you are thinking this is going to be a tough task to create a button. You are wrong this time. In this article, we are going to show you easy steps to make a Recalculate button in Excel. Let’s get started.

How to Make a Recalculate Button in Excel: 5 Steps

There are 5 easy and straightforward steps to make a recalculate button in Excel. But first of all, you have to create a dataset where the formula is created. Typical worksheets contain multiple formulas that may require recalculation. Let’s say we have a worksheet that displays the Countdown to an ongoing exam. Now, we want to find the Time Elapsed each time we click on the Recalculate Button. We have taken the date using the TODAY function and the present time is set by the NOW function. We calculated the Time Elapsed subtracting the Present Time from the Starting time.


Not to mention, we have used the “Microsoft 365” version. You can use any other version at your convenience.

Step 1: Create a VBA Module

  • In the very first step, go to the Developer tab >> pick Visual Basic.

Create a VBA Module for excel recalculate button

  • Consequently, select the Insert tab >> Module >> and click Module1.

  • Thirdly, write the VBA code in the General box.
Sub RecalculateActivesheet()
End Sub

VBA code for excel recalculate button

Read More: How to Recalculate in Excel

Step 2: Insert the Recalculate Button

  • At this moment, we want to put a button on the sheet.
  • In that case, hover over the Developer tab >> move to the Insert command in the Controls section. Pick a Button in the Form Controls command.

Insert the Recalculate Button in Excel

  • Consequently, the Assign Macro dialog wizard appears. Hit the OK button.

  • Sequentially, Button 1 is created. Right-click on the button section and move to the Edit Text command. You can rewrite the name of the button. We have created it as the Recalculate button.

Edit text for excel recalculate button

Step 3: Modify the Button

  • Now, right-click on the button and go to Format Control from the Context Menu.

Modify the Button of recalculate

  • Subsequently, the Format Control window appears. Select Bold in Font Style. Make Size 14 and choose a Color of your preference. Click on OK.

Step 4: Assign Macro to Recalculate Button

  • At this moment, again right-click on the button and select Assign Macro in the Context Menu.

Assign Macro to Recalculate Button in excel

  • Eventually, the Assign Macro window appears. We put the macro name as RecalculateActivesheet and click on OK.

Assign macro window

Step 5: Test the Recalculate Button

  • Finally, we have created the Recalculate button. Click on the button like the image below.

Test the Recalculate Button in Excel

  • Here, the Time Elapsed will be recalculated whenever we click on the Recalculate button.

Forcing Recalculation Using Excel VBA

You can also recalculate the worksheet formula forcefully with the VBA code. Whenever you run the code, it will change the value in your worksheet. Moreover, we have used the same dataset for force recalculation. In the first image, you can see that the Time Elapsed is 1:48 hours.

Forcing Recalculation Using Excel VBA

  • Now, run the following code with the F5 key in the Module as we mentioned in Step 1.
Sub ForceCalc(Optional Full As Boolean)
    With Application
        .Calculation = xlCalculationManual
        .Calculation = xlCalculationAutomatic
        If Full Then.CalculateFull
    End With
End Sub

This code was found on

Forcing Recalculation VBA code

  • Consequently, the Macros window appears. Select the name of the sheet and click on Run.

Consequently, you recalculate the Time Elapsed like the image below.

Read More: How to Force Recalculation with VBA in Excel

How to Refresh an Excel Sheet Automatically

However, we can automatically refresh the dataset numbers by using the keyboard. Additionally, we have taken a dataset of random numbers generated by the RANDBETWEEN function. The formula is in B5:B15 cells.

How to Refresh an Excel Sheet Automatically

After that, press the F9 key, and you can see the random numbers are refreshed automatically. Simple, right? It’s a very easy method to work with.

Download Practice Workbook

Download the following practice workbook. It will help you to realize the topic more clearly.


That’s all about today’s session. And these are some easy steps to make a Recalculate button in Excel. Please let us know in the comments section if you have any questions or suggestions. For a better understanding, please download the practice sheet. Thanks for your patience in reading this article.

<<Go Back to Excel Calculation Options | How to Calculate in Excel | Learn Excel

Get FREE Advanced Excel Exercises with Solutions!
Fahim Shahriyar Dipto
Fahim Shahriyar Dipto

Fahim Shahriyar Dipto is a graduate of Mechanical Engineering at BUET. With over 1.5 years of experience at Exceldemy, he authored 70+ articles on ExcelDemy. He has expertise in designing worksheets at You’ve Got This Math. Currently, He is a Team Leader at Brainor. Dipto's passion extends to exploring various aspects of Excel. Beyond tech, he enjoys creating engaging kids' worksheets using Illustrator. A dedicated employee and innovative content developer, He incorporates a commitment to academic excellence and... Read Full Bio

We will be happy to hear your thoughts

Leave a reply

Advanced Excel Exercises with Solutions PDF