Can I have error message when formula is over value?

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

I need an error message to appear when a range of cells is to more than 24
hrs. The "validation" command only allows for data typed into that cell
directly to have an alert. How can I have a message alert for a cell that
has a formual?
 
Have you got some sample data.

Are you saying you can't use Data Validation to do this.

How about a Forumla in the next cell.. Something like

=IF((SUM(J14:J15)*24)>24,"<<< Error !!, Time cannot be more than 24 hrs
","")
 
One option might be to place code similar to the following in the module for
the specific worksheet.
Here, I assume A10 has your Sum( ) function.

Private Sub Worksheet_Calculate()
If Range("A10") > 1 Then
MsgBox "A10 is greater than 24 Hours"
End If
End Sub
 

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

Back
Top