Getting an ActiveX command button to do a spreadsheet function
Private Sub CommandButton1_Click()
ActiveCell.FormulaR1C1 = "=R[-3]C/R[-2]C"
Range("A4").Select
Selection.NumberFormat = "0.000%"
End Sub
"Givvie" wrote:
I have installed an ActiveX command button on a spreadsheet and I want it to
perfom a formula function.
I want the press of the button to calculate a formula.
The Formula is to be "=A1/A2" with the result being in a 3 decimal point %.
E.g. =A1/A2 where A1=100 and A2=200 then I want my result to be listed in A4
as a 2 decimal % (In this case the answer should be 50%)
|