+ Reply to Thread
Results 1 to 2 of 2

Userform userput with trailing zeros

  1. #1
    Registered User
    Join Date
    02-25-2020
    Location
    Netherlands
    MS-Off Ver
    Office 2016
    Posts
    1

    Exclamation Userform userput with trailing zeros

    I have created an userform where a user inputs a number. These numbers are then put in the worksheet and used for calculations. However, when the user inputs number like 1.000 it gets displays at 1. I would like to keep the amount of decimals that the user put into the textbox which can differ from 2 to 4 decimals. I have tried to look at different form but none explain how I can keep the zeros that the user put into the user form.

  2. #2
    Valued Forum Contributor
    Join Date
    06-22-2018
    Location
    Blackpool, England
    MS-Off Ver
    2019
    Posts
    408

    Re: Userform userput with trailing zeros

    Excel sees it as a number regardless of how many decimals were entered and won't, by default, display redundant decimal points.

    You can change the number format of the cells this applies to to show the decimal points, but that's cosmetic only. If the user inputs "1" it would then display as "1.000", or however you've formatted the cell.

    For a quick look, try hitting the "increase decimal points" button in the formatting section of the home ribbon and watch how the displayed number changes.

    HTH
    Tim
    Never stop learning!
    <--- please consider *-ing !

+ 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. [SOLVED] Keep trailing zeros, but only if they're there...
    By rbrian in forum Excel - New Users/Basics
    Replies: 5
    Last Post: 12-02-2013, 10:47 AM
  2. Remove trailing zeros?
    By arreferee in forum Excel General
    Replies: 1
    Last Post: 01-14-2013, 09:00 PM
  3. [SOLVED] Add Trailing Zeros
    By sweetkel23 in forum Excel Formulas & Functions
    Replies: 12
    Last Post: 12-07-2012, 01:42 AM
  4. Wrong value with trailing zeros
    By temba in forum Excel General
    Replies: 1
    Last Post: 10-01-2012, 05:03 AM
  5. Replies: 5
    Last Post: 04-09-2012, 02:28 PM
  6. Leading and Trailing Zeros
    By ctang in forum Excel General
    Replies: 1
    Last Post: 12-19-2011, 10:18 AM
  7. Remove trailing zeros
    By Garren1013 in forum Excel General
    Replies: 10
    Last Post: 02-21-2011, 05:08 PM
  8. trailing zeros
    By htorres in forum Excel Formulas & Functions
    Replies: 4
    Last Post: 06-23-2007, 03:00 PM

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