+ Reply to Thread
Results 1 to 6 of 6

Restrict data input to whole number percentage between 0 and 30

Hybrid View

  1. #1
    Registered User
    Join Date
    09-13-2016
    Location
    Warsaw, Poland
    MS-Off Ver
    2019
    Posts
    32

    Restrict data input to whole number percentage between 0 and 30

    Hi,

    I have a problem with telling the data validation tool to restrict data input to % that fits between 0 and 30.
    I set the number format in cells to percentage and then I used the whole number type of data validation. I'm stuck on the formulas to tell it more than 0 less than 30.
    I'd appreciate your help.

    Regards,
    Nina

  2. #2
    Forum Expert 63falcondude's Avatar
    Join Date
    08-22-2016
    Location
    USA
    MS-Off Ver
    365
    Posts
    6,266

    Re: Restrict data input to whole number percentage between 0 and 30

    You would have to use Decimal since percentages are decimals.

    Between 0% and 30% is the same as between 0.00 and 0.30

  3. #3
    Forum Expert dflak's Avatar
    Join Date
    11-24-2015
    Location
    North Carolina
    MS-Off Ver
    365
    Posts
    7,957

    Re: Restrict data input to whole number percentage between 0 and 30

    You will have to a database validation to limit the percentages to decimal values between 0.0 and 0.3.

    Now if you only want WHOLE percents, 0%, 1%, 2% ... and not something like 5.5%, then use a helper cell with the formula B2 =A2*100=INT(A2*100) then use a custom validation against this value, like allow entry into A2 when B2 = TRUE.
    One spreadsheet to rule them all. One spreadsheet to find them. One spreadsheet to bring them all and at corporate, bind them.

    A picture is worth a thousand words, but a sample spreadsheet is more likely to be worked on.

  4. #4
    Forum Expert 63falcondude's Avatar
    Join Date
    08-22-2016
    Location
    USA
    MS-Off Ver
    365
    Posts
    6,266

    Re: Restrict data input to whole number percentage between 0 and 30

    Good catch dflak.

    Here's another option if you wouldn't want to allow something like 25.5% (using a custom rule):

    Highlight the cells that you want to apply the data validation to (let's say that's H5:I100) > Data > Data Validation > Allow: Custom > Formula:
    =AND(H5>=0,H5<=0.3,MOD(H5*100,1)=0)
    OK
    Last edited by 63falcondude; 01-17-2019 at 03:40 PM.

  5. #5
    Registered User
    Join Date
    09-13-2016
    Location
    Warsaw, Poland
    MS-Off Ver
    2019
    Posts
    32

    Re: Restrict data input to whole number percentage between 0 and 30

    Thank you all, to clarify I do want to allow 25%, but I don't want to allow something like 25,3%. I'll try using the methods you suggested.

  6. #6
    Forum Expert 63falcondude's Avatar
    Join Date
    08-22-2016
    Location
    USA
    MS-Off Ver
    365
    Posts
    6,266

    Re: Restrict data input to whole number percentage between 0 and 30

    You must have seen my response from post #4 before I edited it. The formula that is in there now should work for you.

+ 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. Restrict Input to One Cell or Another Using Data Validation
    By Era715 in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 05-15-2017, 01:09 PM
  2. Replies: 2
    Last Post: 11-20-2016, 03:04 PM
  3. [SOLVED] Input number to cell, but display as a relative percentage
    By ajgcook83 in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 10-05-2016, 01:40 AM
  4. Replies: 3
    Last Post: 11-27-2013, 04:47 AM
  5. [SOLVED] Data Validation Query: Restrict the data input to two decimal places
    By The_Snook in forum Excel General
    Replies: 6
    Last Post: 12-01-2012, 05:42 PM
  6. Data Validation,Restrict Cell Input.
    By JapanDave in forum Excel Programming / VBA / Macros
    Replies: 10
    Last Post: 11-28-2011, 12:56 AM
  7. Replies: 1
    Last Post: 07-20-2009, 12:17 AM

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