Command Button formula determiner

  • Thread starter Thread starter ADIGuy
  • Start date Start date
A

ADIGuy

Hello, thanks in advance for your help. I want to have a formula in
cell change depending on weather a command button is depressed or no
(not depressed will run one formula; if depressed will run a differen
formula). It can also be referencing a check box (does not have to b
a button). Can I do this? How?

Thanks!
 
Here is an example based upon checkboxes (seeing as I recommended that<vbg>.

Put this code in a macro and assign that macro to the checkbox

If ActiveSheet.CheckBoxes("Check Box 2").Value = xlOn Then
ActiveCell.FormulaR1C1 = "=SUM(RC[-10]:RC[-1])"
Else
ActiveCell.FormulaR1C1 = "=R1C1*17.5%"
End If


--

HTH

Bob Phillips
... looking out across Poole Harbour to the Purbecks
(remove nothere from the email address if mailing direct)
 
Back
Top