formula validation
I have the formula in the code. I need to be able to reference the formula
in the cell and compare it to a string containing the formula. Each cell
has a different formula. I was tring to us a case for the cell like this.
formularange = Worksheets("Testing Sheet").Range("e8: f25 )
For Each cell In formularange
For Each cell In formularange
Select Case cell
Case e8
formulatest = "=E9+C8"
Case e9
formulatest = "=E10+C9"
End Select
If cell.Formula = formulatest Then
Response = MsgBox(cell.Formula & vbNewLine & formulatest)
Else
Response = MsgBox(cell.Formula & vbNewLine & formulatest)
End If
The message boxes were just for testing purposes, but the problem is with
the if statement.
"jim" wrote in message
...
I would like to be able to check to see if a formula has been modified. I
need to do this for a lot of cells, so I am trying to use a loop, but I am
having no luck. Any ideas?
|