E.g.:
Private Sub CommandButton1_Click()
With Worksheets("Sheet2") 'In stead of Sheet2, typ the really name of your sheet
If .Range("E1").Value <> "" Then
.Range("E1").Value = ""
Else
.Range("E1").Formula = "=sum(A1:A4)" ' Example of a formula (totals A1:A4 in sheet2)
End If
End With
End Sub
Albert 1