+ Reply to Thread
Results 1 to 8 of 8

Limit a Cell To a Max Value (No list or Macro)

Hybrid View

  1. #1
    Registered User
    Join Date
    08-16-2016
    Location
    RSA
    MS-Off Ver
    2010
    Posts
    8

    Limit a Cell To a Max Value (No list or Macro)

    Hi All,

    Is there a way to limit the max value of a cell without creating a list?

    Ex. The user has to enter a value in say Cell A1. The max allowed value is 500. If the user exceeds that amount the value has to return to 500.


    Thanks

  2. #2
    Forum Expert Tony Valko's Avatar
    Join Date
    12-31-2011
    Location
    Pittsburgh
    MS-Off Ver
    2002, 2007:2013
    Posts
    18,890

    Re: Limit a Cell To a Max Value (No list or Macro)

    You can use data validation to do that.

    Is there a minimum value? Does it have to be a whole number?
    Biff
    Microsoft MVP Excel
    Keep It Simple Stupid

    Let's Go Pens. We Want The Cup.

  3. #3
    Registered User
    Join Date
    08-16-2016
    Location
    RSA
    MS-Off Ver
    2010
    Posts
    8

    Re: Limit a Cell To a Max Value (No list or Macro)

    Hi Tony,

    It has no minimum value and it is whole numbers only.

    How would you use data validation to limit the value? I looked through it but clearly missed something

  4. #4
    Forum Expert Tony Valko's Avatar
    Join Date
    12-31-2011
    Location
    Pittsburgh
    MS-Off Ver
    2002, 2007:2013
    Posts
    18,890

    Re: Limit a Cell To a Max Value (No list or Macro)

    Try this...

    Select cell A1
    Goto the Data tab>Data Validation
    Allow: Whole number
    Data: less than or equal to
    Maximum: 500

    You can use a custom error message if desired. Click the Error Alert tab and fill in the info.

    OK out when finished.

    Try it out. Enter some random numbers in A1 and see what happens.

  5. #5
    Registered User
    Join Date
    08-16-2016
    Location
    RSA
    MS-Off Ver
    2010
    Posts
    8

    Re: Limit a Cell To a Max Value (No list or Macro)

    Ok so I had a look at it again.

    The data validation only gives a warning if the value entered is out of the range specified giving me 2 options:
    1. Retry - which allows the user to enter another value.
    2. Cancel - returning the cell to the previous value.

    I require that if a user enters a value above 500, the value in the cell is returned to 500 (cell started off blank)

  6. #6
    Forum Expert Tony Valko's Avatar
    Join Date
    12-31-2011
    Location
    Pittsburgh
    MS-Off Ver
    2002, 2007:2013
    Posts
    18,890

    Re: Limit a Cell To a Max Value (No list or Macro)

    That's not possible without using an event macro.

  7. #7
    Registered User
    Join Date
    08-16-2016
    Location
    RSA
    MS-Off Ver
    2010
    Posts
    8

    Re: Limit a Cell To a Max Value (No list or Macro)

    I was hoping that would not be the solution.

    Thank you very much for the help.

  8. #8
    Forum Expert Tony Valko's Avatar
    Join Date
    12-31-2011
    Location
    Pittsburgh
    MS-Off Ver
    2002, 2007:2013
    Posts
    18,890

    Re: Limit a Cell To a Max Value (No list or Macro)

    You're welcome.

    Good luck!

+ 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. Replies: 1
    Last Post: 08-15-2015, 10:47 PM
  2. Macro to sort by custom list >256 character limit
    By KoreanIan in forum Excel Programming / VBA / Macros
    Replies: 7
    Last Post: 03-16-2015, 01:13 PM
  3. Limit dropdown list based on selection from another list
    By msmetal in forum Access Tables & Databases
    Replies: 5
    Last Post: 01-23-2015, 11:22 PM
  4. Replies: 3
    Last Post: 10-09-2014, 02:51 AM
  5. [SOLVED] I need a list of those over the Max Limit
    By Chrazyman in forum Excel Formulas & Functions
    Replies: 5
    Last Post: 06-03-2014, 09:41 AM
  6. Replies: 3
    Last Post: 08-15-2011, 11:18 AM
  7. Drop down list limit to list
    By Dropdown3 in forum Excel General
    Replies: 4
    Last Post: 03-03-2006, 06:00 PM

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