+ Reply to Thread
Results 1 to 5 of 5

Message Warning Box/Data Validation

  1. #1
    Registered User
    Join Date
    04-09-2007
    Posts
    2

    Cool Message Warning Box/Data Validation

    I have a spreadsheet that calculates a total (Cell N75) from several other cells (O2+N79-N77) which is a sum of a range of cells (a72:k72) I need a way to be alerted, such as a message box, when the total of N75 falls below 0 or rises above 96. I've tried several custom formulas (=AND(($O$2+$N$79-$N$77)>=0,($O$2+$N$79-$N$77)<=96) in the data validation field, but none seem to work.
    I've tried this in the cells where the data is entered, where they are calculated, and in the final cell, N75.

    Anyone have any ideas?

    thanks!

  2. #2
    Forum Expert mrice's Avatar
    Join Date
    06-22-2004
    Location
    Surrey, England
    MS-Off Ver
    Excel 2013
    Posts
    4,967
    You could try an event driven macro working off the calulate event to check the vlue of the cell and generate a message box if outside your range.

  3. #3
    Forum Moderator davesexcel's Avatar
    Join Date
    02-19-2006
    Location
    Regina
    MS-Off Ver
    MS 365
    Posts
    13,524
    Quote Originally Posted by AdrianIT
    I have a spreadsheet that calculates a total (Cell N75) from several other cells (O2+N79-N77) which is a sum of a range of cells (a72:k72) I need a way to be alerted, such as a message box, when the total of N75 falls below 0 or rises above 96. I've tried several custom formulas (=AND(($O$2+$N$79-$N$77)>=0,($O$2+$N$79-$N$77)<=96) in the data validation field, but none seem to work.
    I've tried this in the cells where the data is entered, where they are calculated, and in the final cell, N75.

    Anyone have any ideas?

    thanks!
    Hi,
    you don't require a formula

    goto data validation
    select whole number
    data is
    between

    min 0
    max 96

    if there are values outside of those limits, the data validation will kick in

  4. #4
    Forum Expert mikerickson's Avatar
    Join Date
    03-30-2007
    Location
    Davis CA
    MS-Off Ver
    Excel 2011
    Posts
    6,229
    Data validation will kick in only if the bad value is the result of user input to the cell with validation.
    The custom formula
    Please Login or Register  to view this content.
    in O2, N79 and N77 should work.

  5. #5
    Registered User
    Join Date
    04-09-2007
    Posts
    2
    Yes, I tried putting that formula in those cells...didn't work. The data is not entered there, but is calculated and linked from yet other cells.

    I found my answer...we ended up putting code in the ThisWorkbook code pane. This let the code work on all the worksheets (18 of them) after I went in and enabled the macros.

    I appreciate everyones response to my dilemma!

+ 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