+ Reply to Thread
Results 1 to 9 of 9

Sum and rounding

  1. #1
    Registered User
    Join Date
    05-07-2012
    Location
    Sussex, UK
    MS-Off Ver
    Excel 2010
    Posts
    4

    Sum and rounding

    Hi everybody

    I need to build a certain number of buildings. For this example, 365 over a 4 year period.

    I know the total required, and I need to divide it into years. For each year I can divide 365 by 4 and I get 91.25.

    But I need each year to show an integer, i.e. 91 or 92 - so I'm actually building 91 in three years and 92 in one, to reach my total of 365.

    Is there a way to get Excel to do this automatically?

    Rob

  2. #2
    Forum Expert Fotis1991's Avatar
    Join Date
    10-11-2011
    Location
    Athens(The homeland of the Democracy!). Greece
    MS-Off Ver
    Excel 1997!&2003 & 2007&2010
    Posts
    13,744

    Re: Sum and rounding

    Hi and welcome to the forum.

    Try with round....

    =ROUND(365/4;0)

    =ROUNDUP(365/4;0)
    Regards

    Fotis.

    -This is my Greek whisper to Europe.

    --Remember, saying thanks only takes a second or two. Click the little star * below, to give some Rep if you think an answer deserves it.

    Advanced Excel Techniques: http://excelxor.com/

    --KISS(Keep it simple Stupid)

    --Bring them back.

    ---See about Acropolis of Athens.

    --Visit Greece.

  3. #3
    Registered User
    Join Date
    05-07-2012
    Location
    Sussex, UK
    MS-Off Ver
    Excel 2010
    Posts
    4

    Re: Sum and rounding

    Thanks, Fotis. I can't get that to work though. It just tells me the formula contains an error. And looking through help, I can't see a construction of the round function other than number; num_digit.

    The trouble is that this is something I need to be able to do repeatedly. Whatever the total number is, I need the sums in each of the four years to be integers, and for the total of the four years to match the original.

    Rob

  4. #4
    Forum Expert Fotis1991's Avatar
    Join Date
    10-11-2011
    Location
    Athens(The homeland of the Democracy!). Greece
    MS-Off Ver
    Excel 1997!&2003 & 2007&2010
    Posts
    13,744

    Re: Sum and rounding

    Must be that you use comma, not semi-colons in formulae..!

    =ROUND(365/4,0)

    =ROUNDUP(365/4,0)

    But i can not suggest something more, i think that we need a small sample workbook.

  5. #5
    Registered User
    Join Date
    05-07-2012
    Location
    Sussex, UK
    MS-Off Ver
    Excel 2010
    Posts
    4

    Re: Sum and rounding

    Hi Fotis

    Thank you, that makes the formula work, but it doesn't give me what I need.

    I've attached a sample that might show you better.

    Rob
    Attached Files Attached Files

  6. #6
    Forum Expert Fotis1991's Avatar
    Join Date
    10-11-2011
    Location
    Athens(The homeland of the Democracy!). Greece
    MS-Off Ver
    Excel 1997!&2003 & 2007&2010
    Posts
    13,744

    Re: Sum and rounding

    An unusual way(but gives the corect result) is this.

    In C10 , D10 , E10, put this formula.

    =ROUND($D$5/4,0)

    In F10, this formula.

    =D5-SUM(C11:E11)

    Is this, works for you?

  7. #7
    Registered User
    Join Date
    05-07-2012
    Location
    Sussex, UK
    MS-Off Ver
    Excel 2010
    Posts
    4

    Re: Sum and rounding

    Yes, that works. Thank you, Fotis, you are a genius.

    Rob

    PS you are right to be proud to be a Greek :-)

  8. #8
    Forum Expert Fotis1991's Avatar
    Join Date
    10-11-2011
    Location
    Athens(The homeland of the Democracy!). Greece
    MS-Off Ver
    Excel 1997!&2003 & 2007&2010
    Posts
    13,744

    Re: Sum and rounding

    Thank you very match Rob.

    Specially for your second paragraph

  9. #9
    Forum Guru (RIP) Marcol's Avatar
    Join Date
    12-23-2009
    Location
    Fife, Scotland
    MS-Off Ver
    Excel '97 & 2003/7
    Posts
    7,216

    Re: Sum and rounding

    You could extend that to make it a little more dynamic.
    Add or Delete a year in D9:M9, drag the formula further than M9 if required.
    See this workbook.
    Attached Files Attached Files
    If you need any more information, please feel free to ask.

    However,If this takes care of your needs, please select Thread Tools from menu above and set this topic to SOLVED. It helps everybody! ....

    Also
    اس کی مدد کرتا ہے اگر
    شکریہ کہنے کے لئے سٹار کلک کریں
    If you are satisfied by any members response to your problem please consider using the small Star icon bottom left of their post to show your appreciation.

+ 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