+ Reply to Thread
Results 1 to 4 of 4

Returning an error message when a data value entered is not within range

  1. #1
    Registered User
    Join Date
    02-10-2014
    Location
    Australia
    MS-Off Ver
    Excel 2013
    Posts
    4

    Returning an error message when a data value entered is not within range

    Hi all,

    I'm attempting to create an invoice workbook for a school assignment that uses vlookup to find a customer and their details, and then in a table below, works out prices of orders. The system is working great, and I have no errors with it at the moment, but part of the requirements for the invoice is that it must be 'idiot proof'. What I want to do, is if a value greater than 10 is entered in any of the yellow cells in the 'Stock Code' column, return an error to the user stating that they must enter a value between 1-10. The 1-10 in this instance refers to a stocklist on the next sheet, which has a numbered list, 1 being Basketball, 2 being Netball and so on, up until 10. If a number greater than 10 is entered in the 'Stock Code', how do I politely tell the user?

    Sorry for the vagueness as I am still getting my head around using excel. If you need further details, just let me know. Thanks for your help Capture.PNG

  2. #2
    Valued Forum Contributor
    Join Date
    03-29-2013
    Location
    United Kingdom
    MS-Off Ver
    Office/Excel 2013
    Posts
    1,749

    Re: Returning an error message when a data value entered is not within range

    Data validation is probably your best option.

    1.Select all the cells where data is input
    2. Select Data validation from the ribbon
    3. Under the "Allow", select Whole Number
    4. Then set the values for between 1 and 10.

    You can also add custom error messages on the tabs of the data validation form
    Elegant Simplicity............. Not Always

  3. #3
    Registered User
    Join Date
    02-10-2014
    Location
    Australia
    MS-Off Ver
    Excel 2013
    Posts
    4

    Re: Returning an error message when a data value entered is not within range

    Thanks heaps AndyLitch, worked like a charm

  4. #4
    Valued Forum Contributor
    Join Date
    03-29-2013
    Location
    United Kingdom
    MS-Off Ver
    Office/Excel 2013
    Posts
    1,749

    Re: Returning an error message when a data value entered is not within range

    anytime bro

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. Userform returning an error message
    By hstarr2021 in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 12-18-2013, 06:32 PM
  2. Replies: 0
    Last Post: 07-31-2013, 06:03 AM
  3. Macro returning Error Message
    By Pbraun1 in forum Excel General
    Replies: 1
    Last Post: 02-01-2012, 01:35 AM
  4. Create Error message for different dates entered.
    By emdad16 in forum Excel General
    Replies: 1
    Last Post: 08-29-2010, 07:29 AM
  5. Create Error message for different dates entered.
    By emdad16 in forum Excel General
    Replies: 2
    Last Post: 08-24-2010, 05:36 AM

Tags for this Thread

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