Check to see if a formula is correct
Hi
Try
Sub Macro1()
If Range("A1").HasFormula Then
Exit Sub
Else
Range("C1").Copy
Range("A1").PasteSpecial Paste:=xlFormulas
Application.CutCopyMode = False
End If
End Sub
Regards
Roger Govier
oldjay wrote:
I want to do something like this
Sub Macro1()
If Range("A1") =(=B1 + B2) Then ' This is a formula
Exit Sub
Else
Range("C1").Select 'Has correct formula
Selection.Copy
Range("A1").Select
Selection.PasteSpecial Paste:=xlFormulas
End If
End Sub
How do I do this?
|