+ Reply to Thread
Results 1 to 7 of 7

Limit cell inputs to disallow fractions

  1. #1
    Registered User
    Join Date
    09-24-2010
    Location
    Illinois, USA
    MS-Off Ver
    Excel 2007
    Posts
    21

    Limit cell inputs to disallow fractions

    I have a spreadsheet that requires inputs from many individuals. There are cells for SKU length, width and height. These values are used in calculations. The problem is some individuals enter fractional values. For example, instead of entering 2.5 they'll enter 2 1/2. Is there a way to limit inputs so fractions can't be entered?

    I tried using data validation, but was unsuccessful.

  2. #2
    Forum Guru MarvinP's Avatar
    Join Date
    07-23-2010
    Location
    Woodinville, WA
    MS-Off Ver
    Office 365
    Posts
    16,169

    Re: Limit cell inputs to disallow fractions

    Hi sbernard,

    Try the attached with data validation.
    Attached Files Attached Files
    One test is worth a thousand opinions.
    Click the * Add Reputation below to say thanks.

  3. #3
    Forum Expert ben_hensel's Avatar
    Join Date
    01-26-2012
    Location
    Northeast USA
    MS-Off Ver
    Office 365
    Posts
    2,043

    Re: Limit cell inputs to disallow fractions

    well, assuming they're entering the fractions correctly, it doesn't really matter because the fractions can be used by excel to do math anyway?

    Another thing to do is, set the cell format from general to number beforehand, so even if they enter a fraction, it's displayed as a decimal. Personally that would be my preferred solution--let people enter the data however they want, but display it the "correct" way.

    My biggest concern would be that the fractions are entered wrong, so they get treated like a text string instead of a number, ie someone putting in "1/2" instead of "0 1/2"; excel would assume "Jan 2nd", not "one half". But "excel thinks you meant date when you meant fractions" is a slightly different problem... and preformatting the cells to "number" precludes that from happening anyway.

  4. #4
    Forum Expert
    Join Date
    06-08-2012
    Location
    Left the forum!
    MS-Off Ver
    Left the forum!
    Posts
    5,189

    Re: Limit cell inputs to disallow fractions

    Your calculations should still work, the underlying values will still be decimal.

    Try setting the cell format as number instead of general, then enter a fraction in the cell.

  5. #5
    Registered User
    Join Date
    09-24-2010
    Location
    Illinois, USA
    MS-Off Ver
    Excel 2007
    Posts
    21

    Re: Limit cell inputs to disallow fractions

    Thanks Ben! Sometimes I try and make things too complicated.

  6. #6
    Registered User
    Join Date
    09-24-2010
    Location
    Illinois, USA
    MS-Off Ver
    Excel 2007
    Posts
    21

    Re: Limit cell inputs to disallow fractions

    Marvin - Thanks for your input. However, I want to allow decimals, just not fractions.

  7. #7
    Forum Guru MarvinP's Avatar
    Join Date
    07-23-2010
    Location
    Woodinville, WA
    MS-Off Ver
    Office 365
    Posts
    16,169

    Re: Limit cell inputs to disallow fractions

    This will work great if .5 <> 1/2. However they are the same to Excel.

    Good luck with your search.

+ 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