Validating a Formula

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.
 
J

J.E. McGimpsey

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.
 
T

Tom Ogilvy

Just to add, Data Validation is only applied when you make a manual change
to a cell.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top