stop calculation

BrendanDixon

Board Regular
Joined
Mar 7, 2010
Messages
174
Office Version
  1. 365
  2. 2019
Platform
  1. Windows
Hi all,

I have a spreadsheet that calculates the difference in date and time from a predetemined date and time to the current date and time. I would like to have it that I have a form checkbox and when I check the checkbox it will keep the value in the calcutation but is will not continue calculating on the cell. I do not want to change to manual calculations because the are other calculations running on the same spreadsheed.

Example of what I have( but not doing what I want it to):
I have the check box linked to cell A4
Cell A3 =A1-(A2*A)

When the check box is selected it gives the answer I want when it is unchecked and when unchecked it gives the answer of A1

can somone help
 

Excel Facts

Create a Pivot Table on a Map
If your data has zip codes, postal codes, or city names, select the data and use Insert, 3D Map. (Found to right of chart icons).
I couldn't do this with formulas alone; had to put code in to make this scenario work.

Code:
Private Sub CheckBox1_Click()
    If CheckBox1.Value Then
        Range("A3").Formula = "=A1-(A2*A1)"
    Else
        Range("A3").Value = Range("A3").Value
    End If
End Sub
 
Upvote 0
mmmmm no does not seem to work


Basically what I want to do is prevent the automatic calculation of cell A3 if the checkbox is checked. I tried you code and it seems to still update when I refresh the sheet.
 
Upvote 0
You can switch it up then...
Code:
Private Sub CheckBox1_Click()
    If [COLOR=blue]Not[/COLOR] CheckBox1.Value Then
        Range("A3").Formula = "=A1-(A2*A1)"
    Else
        Range("A3").Value = Range("A3").Value
    End If
End Sub
(Also, the formula being coded to A3 is sample)
 
Upvote 0

Forum statistics

Threads
1,224,561
Messages
6,179,521
Members
452,923
Latest member
JackiG

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top