+ Reply to Thread
Results 1 to 6 of 6

Number of Digit after the coma depending on the value

  1. #1
    Registered User
    Join Date
    02-22-2012
    Location
    France
    MS-Off Ver
    Excel 2010
    Posts
    3

    Number of Digit after the coma depending on the value

    Hello,

    Here is my concern:
    I wish to automatize the display of digit after the coma based on the value.
    For instance if the result of a calculation made in a cell is: 9.8, I wish Excel to display 9.8 but if the value becomes higher than 100, I wish Excel to remove the digit after the coma. For instance if the result of a calculation is: 102.8, I wish Excel to round it and display 103.
    Or it would be even more flexible if I could set a value, for instance 90 so that when the result of my calculation is above 90, it does not display the digit anymore.

    Thank you for your help. This is a big issue for me.

    Phil
    Last edited by Phil6128; 02-22-2012 at 06:05 AM.

  2. #2
    Forum Expert
    Join Date
    06-09-2010
    Location
    Australia
    MS-Off Ver
    Excel 2013
    Posts
    1,714

    Re: Number of Digit after the coma depending on the value

    Hi
    try applying a custom format:

    [<100]#,##0.0 ;#,##0

  3. #3
    Forum Expert Pepe Le Mokko's Avatar
    Join Date
    05-14-2009
    Location
    Belgium
    MS-Off Ver
    O365 v 2402
    Posts
    13,448

    Re: Number of Digit after the coma depending on the value

    If you only want to adapt the formatting try [<100]00.0;[>=100]000;General as Custom Formay

  4. #4
    Registered User
    Join Date
    02-22-2012
    Location
    France
    MS-Off Ver
    Excel 2010
    Posts
    3

    Re: Number of Digit after the coma depending on the value

    Quote Originally Posted by Pepe Le Mokko View Post
    If you only want to adapt the formatting try [<100]00.0;[>=100]000;General as Custom Formay

    Thank you very much to both of you. I implemented it in the Excel sheets I use for some procedures of our Biomedical Research Institut (University).
    Thank you again.

  5. #5
    Registered User
    Join Date
    02-22-2012
    Location
    France
    MS-Off Ver
    Excel 2010
    Posts
    3

    Re: Number of Digit after the coma depending on the value

    Quote Originally Posted by Phil6128 View Post
    Thank you very much to both of you. I implemented it in the Excel sheets I use for some procedures of our Biomedical Research Institut (University).
    Thank you again.
    The thing I don't understand thought is the fact I cannot enter more than 2 conditions:
    [<100]0.0;[>=100]000 works but if I add another conditions do that 50 is not displayed with a digit after the dot then Excel refuses the formula:
    [<100]0.0;[>=100]000;[=50]00

    Any idea?

    Phil

  6. #6
    Forum Moderator vlady's Avatar
    Join Date
    09-22-2011
    Location
    Philippines - OLSHCO -Guimba-Nueva Ecija
    MS-Off Ver
    2021
    Posts
    4,361

    Re: Number of Digit after the coma depending on the value

    hello
    if equal to 50 then 00
    if less than 101( include 100) 0.0
    else 000



    [=50]00;[<101]0.0;000

    I think people forget the word "THANK YOU!!!!" Do you still know it???

    There is a little star ( ADD REPUTATION ) below those person who helped you. Click it to say your "PRIVATE APPRECIATION TO THEIR EFFORT ON THEIR CONTRIBUTIONS "

    Regards,
    Vladimir

+ 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