+ Reply to Thread
Results 1 to 5 of 5

How to use MROUND correctly

  1. #1
    Registered User
    Join Date
    11-21-2013
    Location
    ontario, canada
    MS-Off Ver
    Excel 2007
    Posts
    18

    How to use MROUND correctly

    I have an excel spreadsheet I use once a year so its time to adjust for the lose of pennies in Canada.

    I have read about the MROUND function but am unclear how to use it?

    For example on one sheet for say "Joe" I enter a column of numbers (2 decimal places is currently used as it a cost) At the page bottom I total that column and eventually move that total to a second sheet. I want that total at the bottom of the first sheet to be rounded up or down to the nearest nickel, and displayed that way, before the value is used on the second sheet.

    The formula for the total at the bottom of the first sheet is just the sum of a range of cells

    =SUM(D5:D19)

    How do I make that displayed total show as rounded to the nearest nickel??

    Thanks Doug

  2. #2
    Forum Expert daddylonglegs's Avatar
    Join Date
    01-14-2006
    Location
    England
    MS-Off Ver
    2016
    Posts
    14,675

    Re: How to use MROUND correctly

    Hello Doug, try this version

    =MROUND(SUM(D5:D19),0.05)
    Audere est facere

  3. #3
    Registered User
    Join Date
    11-21-2013
    Location
    ontario, canada
    MS-Off Ver
    Excel 2007
    Posts
    18

    Re: How to use MROUND correctly

    well that works exactly as I need.

    Now how do I incorporate it in an IF statement if I have a negative result?
    Example:

    =IF(Total_mandays<>0,(Total_work_costs/Total_mandays*Vin_mandays-Vin_total_work_costs),0)
    becomes
    =MROUND(IF(Total_mandays<>0,(Total_work_costs/Total_mandays*Vin_mandays-Vin_total_work_costs),0),0.05)

    Works fine. HOWEVER if the result is a negative value (In other words that person is owed money) then my output is #NUM! ???

    Doug
    Last edited by Dougj; 11-21-2013 at 10:57 PM.

  4. #4
    Registered User
    Join Date
    11-21-2013
    Location
    ontario, canada
    MS-Off Ver
    Excel 2007
    Posts
    18

    Re: How to use MROUND correctly

    after further investigation it appears that the MROUND function is not the best solution when resultant values may be negative or positive as the MROUND multiple must match the resultant.

    example if the multiple is 0.05 then the resultant must be poitive and if multiple = -0.05 then the resultant must be a negative number.

    It turns out the ROUND & ROUNDDOWN functions worked best for my needs, using this format

    =ROUNDDOWN(x/m,0)*m

  5. #5
    Forum Contributor arlu1201's Avatar
    Join Date
    09-09-2011
    Location
    Bangalore, India
    MS-Off Ver
    Excel 2003 & 2007
    Posts
    19,166

    Re: How to use MROUND correctly

    Based on your last post in this thread, its apparent that you are satisfied with the solution(s) you've received and have solved your question, but you haven't marked your thread as "SOLVED". I will do it for you this time.

    In future, to mark your thread as Solved, you can do the following -
    Select Thread Tools-> Mark thread as Solved.

    Incase your issue is not solved, you can undo it as follows -
    Select Thread Tools-> Mark thread as Unsolved.

    Also, since you are relatively new to the forum, i would like to inform you that you can thank those who have helped you by clicking the small star icon located in the lower left corner of the post which helped you. This adds to the reputation of the person who has taken the time to help you.
    If I have helped, Don't forget to add to my reputation (click on the star below the post)
    Don't forget to mark threads as "Solved" (Thread Tools->Mark thread as Solved)
    Use code tags when posting your VBA code: [code] Your code here [/code]

+ 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. How do I add MROUND
    By STU22 in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 01-04-2013, 07:53 PM
  2. Use of Mround
    By chandan12 in forum Excel General
    Replies: 1
    Last Post: 08-17-2007, 02:58 PM
  3. [SOLVED] IF & MROUND
    By phuser in forum Excel General
    Replies: 3
    Last Post: 06-27-2006, 09:25 AM
  4. MRound
    By Lucky_guy2000 in forum Excel General
    Replies: 2
    Last Post: 04-21-2006, 08:45 AM
  5. Mround
    By ynissel in forum Excel General
    Replies: 1
    Last Post: 06-02-2005, 01:05 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