+ Reply to Thread
Results 1 to 3 of 3

Can I have error message when formula is over value?

  1. #1
    dvozar
    Guest

    Can I have error message when formula is over value?

    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?

  2. #2
    Forum Contributor VBA Noob's Avatar
    Join Date
    04-25-2006
    Location
    London, England
    MS-Off Ver
    xl03 & xl 07(Jan 09)
    Posts
    11,988
    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 ","")

  3. #3
    Dana DeLouis
    Guest

    Re: Can I have error message when formula is over value?

    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

    --
    HTH. :>)
    Dana DeLouis
    Windows XP, Office 2003


    "dvozar" <[email protected]> wrote in message
    news:[email protected]...
    >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?




+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1