Validating a Formula

  • Thread starter Thread starter Cath
  • Start date Start date
C

Cath

I am trying to validate a cell that has a formula in it.

i.e. c132=sumc1:c131

i need to have an error message appear in the sum of c132
is greater than 65. i can get the validation to work on a
cell that has a number entered directly but cannot get it
to work on a cell that has a formula.
 
One way:

Put this in the worksheet code module


Private Sub Worksheet_Calculate()
If Range("C132").Value > 65 Then MsgBox "C132 > 65"
End Sub

You might also consider using Conditional Formatting to change the
cell color instead.
 
Just to add, Data Validation is only applied when you make a manual change
to a cell.
 
Back
Top