gpt-3.5-turbo-0301· OpenAI
WildChat-4.8M (AI2)
I have calculations set to manual in my excel sheet. I want the sheet to calculate when…
- User
I have calculations set to manual in my excel sheet. I want the sheet to calculate when I enter values in a specific cell is this possible
- Assistant
Yes, this is possible. You can use VBA code to achieve this.
- Open the Visual Basic Editor by pressing ALT + F11.
- Go to the worksheet where you want the sheet to calculate automatically.
- Double-click on the sheet name in the Project Explorer window to open the code window for that sheet.
- Paste the following code into the code window:
Private Sub Worksheet_Change(ByVal Target As Range) If Target.Address = "1" Then Application.Calculate End If End Sub
- In this code, change "1" to the cell where you want the sheet to calculate when a value is entered.
- Save the workbook as a macro-enabled workbook (.xlsm) and close the Visual Basic Editor.