+ Reply to Thread
Results 1 to 14 of 14

Cell to restrict User Input

  1. #1
    Forum Contributor
    Join Date
    07-12-2012
    Location
    New Jersey, USA
    MS-Off Ver
    Excel 2010
    Posts
    201

    Cell to restrict User Input

    I have an excel sheet that does fraction calculations. But if a user doesn't enter the data in correctly, the answers will be incorrect. Is there a way to restrict a users input to meet proper conditions to help avoid improper data entry?

    56' 7 3/16 <=== is the proper format

    56-7-3/16 or 56 7-3/16 or 56-7 3/16 <==== wrong format
    Attached Files Attached Files

  2. #2
    Forum Expert
    Join Date
    05-30-2012
    Location
    The Netherlands
    MS-Off Ver
    Office 365
    Posts
    14,987

    Re: Cell to restrict User Input

    your file is not clear to me.

    maybe you could make a list of all data which users are allowed to imput.

    then you can use that list as datavalidation (for the correct imput).
    Notice my main language is not English.

    I appreciate it, if you reply on my solution.

    If you are satisfied with the solution, please mark the question solved.

    You can add reputation by clicking on the star * add reputation.

  3. #3
    Forum Contributor
    Join Date
    07-12-2012
    Location
    New Jersey, USA
    MS-Off Ver
    Excel 2010
    Posts
    201

    Re: Cell to restrict User Input

    I don't think Data Validation is going to work as the users are entering in Feet and Inches figures, which are unlimted.

    The user Enters Data into cell B10, and B11 and the form calculates the difference in Cell D12. So I need the users to be restricted to entering the data in the correct format of XX' XX X/X in all fields.

  4. #4
    Registered User
    Join Date
    05-03-2011
    Location
    https://t.me/pump_upp
    MS-Off Ver
    Excel 2016
    Posts
    98

    Re: Cell to restrict User Input

    Please explain.... XX' XX X/X Data is entered by manually?

    if yes....


    why you are split the values entering. then merge all fields.

  5. #5
    Forum Contributor
    Join Date
    07-12-2012
    Location
    New Jersey, USA
    MS-Off Ver
    Excel 2010
    Posts
    201

    Re: Cell to restrict User Input

    Feet , Inches and fractions = XX' XX X/X

    Yes the data entered into fields B10 and B11 are Manual Entry. While Cell B12 is calculated automatically based on data in B10 and B11.

  6. #6
    Banned User!
    Join Date
    10-29-2012
    Location
    Europe
    MS-Off Ver
    2013, 2016
    Posts
    318

    Re: Cell to restrict User Input

    Quote Originally Posted by midnightorion View Post
    Feet , Inches and fractions = XX' XX X/X

    Yes the data entered into fields B10 and B11 are Manual Entry. While Cell B12 is calculated automatically based on data in B10 and B11.
    Why not introduce that date, in 3 different cells, then calculated automatically.

    Instruct users to put Feet in cell, say B10, Inches in say B11 then in say B12 put that fraction and you put formula in say B13
    If so user put only numbers in 2 cells and fraction in the last cell.

  7. #7
    Registered User
    Join Date
    06-16-2016
    Location
    Greece
    MS-Off Ver
    2013
    Posts
    69

    Re: Cell to restrict User Input

    What you're saying is very hard to control in Excel. In Access you can specify data validation rules that can check for the format you describe. But in Excel your only option is VBA which I wouldn't recommend. The best thing you can do is use separate cells like Indi_Ra suggested.

  8. #8
    Forum Contributor
    Join Date
    07-12-2012
    Location
    New Jersey, USA
    MS-Off Ver
    Excel 2010
    Posts
    201

    Re: Cell to restrict User Input

    Thanks guys appreciate the feedback. Could you possibly provide an example of how to implement doing your suggestion in the example excel form I've attached to the thread so I can see and try and duplicate your suggestion. Thanks again.

  9. #9
    Forum Guru
    Join Date
    08-28-2014
    Location
    USA
    MS-Off Ver
    Excel 2019
    Posts
    17,659

    Re: Cell to restrict User Input

    Here is an example of how to use Data Validation to restrict the use of a dash within the measurement. Cell B13 has the following custom data validation formula applied: =ISERR(SEARCH("-",B13))
    Test by attempting to place a dash/hyphen somewhere within that cell.
    Note: the message in the pop up box can be customized.
    Attached Files Attached Files
    Consider taking the time to add to the reputation of everybody that has taken the time to respond to your query.

  10. #10
    Forum Contributor
    Join Date
    07-12-2012
    Location
    New Jersey, USA
    MS-Off Ver
    Excel 2010
    Posts
    201

    Re: Cell to restrict User Input

    Quote Originally Posted by JeteMc View Post
    Here is an example of how to use Data Validation to restrict the use of a dash within the measurement. Cell B13 has the following custom data validation formula applied: =ISERR(SEARCH("-",B13))
    Test by attempting to place a dash/hyphen somewhere within that cell.
    Note: the message in the pop up box can be customized.
    JeteMc

    Thanks that will help alot. using that same thought process, is there a way to make it so the user has to input " ' " this into the formula as well or it'll bring up the error box?

  11. #11
    Forum Contributor
    Join Date
    07-12-2012
    Location
    New Jersey, USA
    MS-Off Ver
    Excel 2010
    Posts
    201

    Re: Cell to restrict User Input

    I'm guessing I'll have to start a new thread in the VBA section to ask this question about how to apply VBA data validation to the cells. But before I do, is it possible to use VBA to restrict the user to entering in a specific manner only? meaning the user has to enter the data as let say 72' 2 3/8 and if the user does enter 72' 2" 3/8 it errors out.

  12. #12
    Forum Guru
    Join Date
    08-28-2014
    Location
    USA
    MS-Off Ver
    Excel 2019
    Posts
    17,659

    Re: Cell to restrict User Input

    Quote Originally Posted by midnightorion View Post
    ...is there a way to make it so the user has to input " ' " this into the formula as well or it'll bring up the error box?
    Try: =AND(ISNUMBER(SEARCH("'",B13)),ISERR(SEARCH("-",B13)))
    As to the questions in post #11, I don't know much about VBA, so I can't say.
    Let us know if you have any questions.

  13. #13
    Forum Contributor
    Join Date
    07-12-2012
    Location
    New Jersey, USA
    MS-Off Ver
    Excel 2010
    Posts
    201

    Re: Cell to restrict User Input

    Quote Originally Posted by JeteMc View Post
    Try: =AND(ISNUMBER(SEARCH("'",B13)),ISERR(SEARCH("-",B13)))
    As to the questions in post #11, I don't know much about VBA, so I can't say.
    Let us know if you have any questions.
    That works perfectly. Except I ran into another problem, which I don't think can be solved without using some VBA. But the suggestion you gave would be perfect if it wasn't for the fact I have users that need to enter decimal feet into the cells at times. Example: 56.25 . This will cause the error to pop up because we are missing the " ' "

    I'll use your formula elsewhere though, which solves other problems I've been dealing with. Appreciate your help.

    Thanks again.

  14. #14
    Forum Guru
    Join Date
    08-28-2014
    Location
    USA
    MS-Off Ver
    Excel 2019
    Posts
    17,659

    Re: Cell to restrict User Input

    You're Welcome. Thank You for the feedback and for marking the thread as 'Solved'. I hope that you have a blessed day.

+ 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: 3
    Last Post: 11-27-2013, 04:47 AM
  2. vba excel user form restrict input on user textbox
    By samz93 in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 04-04-2013, 04:38 PM
  3. [SOLVED] Restrict user input to fraction and decimal only.
    By Garren1013 in forum Excel General
    Replies: 1
    Last Post: 12-26-2012, 01:32 PM
  4. Restrict the order of cell input
    By AJMaso in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 11-15-2012, 05:31 PM
  5. Restrict-Filter-Limit-Validate user input in Excel
    By Dr. Thom in forum Excel General
    Replies: 0
    Last Post: 01-22-2006, 04:10 PM
  6. how do I restrict cell input to dates only?
    By James E Slack in forum Excel General
    Replies: 2
    Last Post: 12-11-2005, 08:10 PM
  7. Restrict input into cell array
    By dlp1848 in forum Excel General
    Replies: 1
    Last Post: 09-26-2005, 04:05 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