+ Reply to Thread
Results 1 to 6 of 6

How block insertion of values with decimal points/commas?

  1. #1
    Registered User
    Join Date
    08-30-2017
    Location
    Sweden
    MS-Off Ver
    Microsoft Office 364 ProPlus
    Posts
    3

    How block insertion of values with decimal points/commas?

    Hi!

    Is there a way to for certain fields block manual insertion of numerical values with decimal points/commas?

    i.e. one should only be allowed to enter integers.

    for some fields, but not all.

  2. #2
    Forum Expert tim201110's Avatar
    Join Date
    10-23-2011
    Location
    Russia
    MS-Off Ver
    2016, 2019
    Posts
    2,357

    Re: How block insertion of values with decimal points/commas?

    data validation, settings, Allow Whole number

  3. #3
    Registered User
    Join Date
    08-30-2017
    Location
    Sweden
    MS-Off Ver
    Microsoft Office 364 ProPlus
    Posts
    3

    Re: How block insertion of values with decimal points/commas?

    @tim201110
    Thanks! nice and easy

    follow-up:
    Is it also possible to restrict manual input to real numbers with only one decimal?
    i.e. 4.1 and 5 are allowed but not 5.67

    there is way to use custom made data validation, but can that we be used for formatting?
    e.g. so that #.# would limit input to one decimal value.
    Last edited by JohanVB; 08-30-2017 at 11:57 AM.

  4. #4
    Forum Expert tim201110's Avatar
    Join Date
    10-23-2011
    Location
    Russia
    MS-Off Ver
    2016, 2019
    Posts
    2,357

    Re: How block insertion of values with decimal points/commas?

    =LEN(10*MOD(H2,1))=1, this is a condition for H2

  5. #5
    Registered User
    Join Date
    08-30-2017
    Location
    Sweden
    MS-Off Ver
    Microsoft Office 364 ProPlus
    Posts
    3

    Re: How block insertion of values with decimal points/commas?

    =LEN(10*MOD(H2,1))=1
    How is this inserted in Excel?
    =LEN(10*MOD(H2,1))=1 makes Excel say there is a an error in formula.
    LEN(10*MOD(H2,1))=1 is accepted by no values whatsoever abide with rule, or so Excel says.


    Do you have to do it for each cell you want to validate?
    say first cell in column of interest is H2.
    Can you validate all below cells with the same formula, or you need to define the rule for each cell?

  6. #6
    Forum Expert tim201110's Avatar
    Join Date
    10-23-2011
    Location
    Russia
    MS-Off Ver
    2016, 2019
    Posts
    2,357

    Re: How block insertion of values with decimal points/commas?

    one can do it for a range
    the above formula for the top left cell
    Attached Images Attached Images
    Attached Files Attached Files

+ 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. Re: Changing from Commas to Decimal changes cell value
    By Brayheart in forum Excel General
    Replies: 4
    Last Post: 11-17-2015, 06:08 AM
  2. Replacing commas/dot as decimal separator
    By Shimazu in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 03-11-2014, 04:09 AM
  3. [SOLVED] Commas to Decimal Points for separator
    By gxb101 in forum Excel Programming / VBA / Macros
    Replies: 11
    Last Post: 08-10-2012, 08:05 PM
  4. Replies: 5
    Last Post: 05-02-2012, 11:05 AM
  5. How to change points to commas?
    By marlonsaveri in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 07-18-2011, 09:44 AM
  6. different decimal points when values should be the same
    By dan2010 in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 11-09-2010, 12:29 PM
  7. Change Dots into Commas as Decimal Divider
    By xenia in forum Excel General
    Replies: 3
    Last Post: 08-08-2005, 04:48 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