Disclosure: This post may contain affiliate links, meaning when you click the links and make a purchase, we receive a commission.

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.


Download Practice Workbook

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


5 Steps to Make a Recalculate Button in Excel

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.

Dataset

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()
  ActiveSheet.Calculate
End Sub

VBA code for excel recalculate button


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 Folkstalk.com.

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.


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.


Conclusion

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. Visit our website, Exceldemy, a one-stop Excel solution provider, to find out about diverse kinds of Excel methods. Thanks for your patience in reading this article.

Fahim Shahriyar Dipto

Fahim Shahriyar Dipto

Hello! Welcome to my Excel blog! I am a big fan of MS Excel. I am learning new and exciting things in Excel and writing the process here. I think this will be helpful for you to get used to Excel. Keep visiting our website for new and updated Excel methods.

We will be happy to hear your thoughts

Leave a reply

ExcelDemy
Logo