+ Reply to Thread
Results 1 to 3 of 3

Rounding a number depending on the fractional value

  1. #1
    Registered User
    Join Date
    10-21-2017
    Location
    Melbourne
    MS-Off Ver
    2010
    Posts
    1

    Post Rounding a number depending on the fractional value

    I have a number that represents a %.For example if the value is say 88.67, I should represent the value as 89. If the value was 88.4, I should display as 88.
    This means if the decimal part of the value is more than 0.5, then add 1 to 88. otherwise display as 88
    I thought this was a simple excel solution. But did not work.
    This is what I used, but does not get evaluated.
    =IF(G8-TRUNC(G8)>0.5,(G8-TRUNC(G8)+1),TRUNC(G8)); G8 is the cell.

  2. #2
    Forum Expert skywriter's Avatar
    Join Date
    06-09-2014
    Location
    USA
    MS-Off Ver
    2016
    Posts
    2,760

    Re: Rounding a number depending on the fractional value

    Have you looked at the round function?

    You state greater than 0.5 but I think the round function starts rounding up at 0.5, not greater than.
    Click the * Add Reputation button in the lower left hand corner of this post to say thanks.

    Don't forget to mark this thread SOLVED by going to the "Thread Tools" drop down list above your first post and choosing solved.

  3. #3
    Forum Guru samba_ravi's Avatar
    Join Date
    07-26-2011
    Location
    Hyderabad, India
    MS-Off Ver
    Excel 2021
    Posts
    8,915

    Re: Rounding a number depending on the fractional value

    =Roundup(g8-0.5,0)
    Samba

    Say thanks to those who have helped you by clicking Add Reputation star.

+ 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. Calculating a fractional average (salary) for a changing base number (bonus program start
    By Bastiaan van Vliet in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 01-26-2017, 05:47 PM
  2. [SOLVED] Cell with text and number, not rounding to closest full number
    By cblp in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 02-03-2014, 07:51 PM
  3. Validation Number number number + letter depending on numbers
    By Adamitus in forum Excel Formulas & Functions
    Replies: 4
    Last Post: 10-31-2012, 04:28 AM
  4. [SOLVED] Converting a Time (hh:mm) to fractional hours & rounding the result.
    By marvshuman in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 05-15-2012, 06:07 PM
  5. Excel 2007 : Removing zero from a fractional number
    By scrufy in forum Excel General
    Replies: 2
    Last Post: 01-08-2011, 09:36 AM
  6. Why is ranking formula giving a fractional number?
    By Jerry M. Photog in forum Excel Formulas & Functions
    Replies: 4
    Last Post: 01-16-2008, 06:28 AM
  7. How do I isolate the Fractional part of a number in Excel VB?
    By Cumulous in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 01-03-2006, 05:00 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