+ Reply to Thread
Results 1 to 20 of 20

The dreaded rounding problem regarding dollars and cents.

Hybrid View

LordMark The dreaded rounding problem... 01-12-2015, 07:40 PM
coolblue The dreaded rounding problem... 01-12-2015, 07:42 PM
LordMark Re: The dreaded rounding... 01-12-2015, 07:51 PM
coolblue Re: The dreaded rounding... 01-12-2015, 07:53 PM
LordMark Re: The dreaded rounding... 01-12-2015, 07:57 PM
coolblue Re: The dreaded rounding... 01-12-2015, 08:02 PM
LordMark Re: The dreaded rounding... 01-12-2015, 08:06 PM
coolblue Re: The dreaded rounding... 01-12-2015, 08:21 PM
shg Re: The dreaded rounding... 01-12-2015, 08:25 PM
coolblue Re: The dreaded rounding... 01-12-2015, 09:48 PM
shg Re: The dreaded rounding... 01-13-2015, 12:34 AM
coolblue Re: The dreaded rounding... 01-13-2015, 02:42 AM
shg Re: The dreaded rounding... 01-13-2015, 11:53 AM
LordMark Re: The dreaded rounding... 01-14-2015, 06:22 PM
LordMark Re: The dreaded rounding... 01-15-2015, 07:58 PM
shg Re: The dreaded rounding... 01-15-2015, 08:00 PM
LordMark Re: The dreaded rounding... 01-15-2015, 08:30 PM
shg Re: The dreaded rounding... 01-16-2015, 01:28 AM
coolblue Re: The dreaded rounding... 01-16-2015, 02:45 AM
LordMark Re: The dreaded rounding... 01-16-2015, 10:59 AM
  1. #1
    Registered User
    Join Date
    01-12-2015
    Location
    Jackson
    MS-Off Ver
    Microsoft Office 2007
    Posts
    8

    The dreaded rounding problem regarding dollars and cents.

    Hello, I am new to this Forum and am desperate. I have a billing spreadsheet where one invoice has the potential of being paid for by up to 6 clients. The amount of each client's invoice is calculated via formula for their assigned percentage responsibility. I find when adding each clients calculated invoice totals, sometimes they total a few cents more than the actual total of the original invoice (clear as mud). See my attached spreadsheet as an example. I populate the Invoice Total column with the total amount found on the invoice generated from my billing program and let the formulas in the spreadsheet calculate each client's assigned responsibility. I have highlighted in yellow an example of a variance. Any suggestion is appreciated.
    Attached Files Attached Files

  2. #2
    Forum Contributor
    Join Date
    10-30-2013
    Location
    Melbourne
    MS-Off Ver
    Excel 2013
    Posts
    173

    The dreaded rounding problem regarding dollars and cents.

    How can you invoice three customers with a single invoice?


    Sent from my iPad using Tapatalk
    Last edited by coolblue; 01-12-2015 at 07:52 PM.

  3. #3
    Registered User
    Join Date
    01-12-2015
    Location
    Jackson
    MS-Off Ver
    Microsoft Office 2007
    Posts
    8

    Re: The dreaded rounding problem regarding dollars and cents.

    That is where my spreadsheet comes into play. One supplier may be responsible for only 30% of the invoice and the other two suppliers may be responsible for 50% and 20%. So I have the spreadsheet where I enter the total amount of the invoice and let the spreadsheet do the percentage calculations.

  4. #4
    Forum Contributor
    Join Date
    10-30-2013
    Location
    Melbourne
    MS-Off Ver
    Excel 2013
    Posts
    173

    Re: The dreaded rounding problem regarding dollars and cents.

    Surely you should invoice them separately, no?


    Sent from my iPad using Tapatalk

  5. #5
    Registered User
    Join Date
    01-12-2015
    Location
    Jackson
    MS-Off Ver
    Microsoft Office 2007
    Posts
    8

    Re: The dreaded rounding problem regarding dollars and cents.

    Unfortunately it is not as simple as it sounds. The billing software I use does not meet the requirements dictated by the suppliers. They all need to see the "Master Invoice" but want their specific percentage breakdown. I could bill separate invoices but then do not have the ability to have one master invoice. So I am working with what I have.

  6. #6
    Forum Contributor
    Join Date
    10-30-2013
    Location
    Melbourne
    MS-Off Ver
    Excel 2013
    Posts
    173

    Re: The dreaded rounding problem regarding dollars and cents.

    Are they suppliers or customers? I got a bit confused on that... If you are invoicing them then I guess they are customers, but when you talk about percentage responsibility it sounds like they are suppliers, in which case they would be invoicing you.
    Either way, why don't you do it the other way round and have separate invoices on your system and make a summary (master) invoice in excel?


    Sent from my iPad using Tapatalk

  7. #7
    Registered User
    Join Date
    01-12-2015
    Location
    Jackson
    MS-Off Ver
    Microsoft Office 2007
    Posts
    8

    Re: The dreaded rounding problem regarding dollars and cents.

    I have explored that option at great length and is not possible at this time. Thanks for taking an interest.

  8. #8
    Forum Contributor
    Join Date
    10-30-2013
    Location
    Melbourne
    MS-Off Ver
    Excel 2013
    Posts
    173

    Re: The dreaded rounding problem regarding dollars and cents.

    OK your Lordship... I'll take a look and get back to you...

  9. #9
    Forum Expert shg's Avatar
    Join Date
    06-20-2007
    Location
    The Great State of Texas
    MS-Off Ver
    2010, 2019
    Posts
    40,689

    Re: The dreaded rounding problem regarding dollars and cents.

    One way:

    Row\Col
    A
    B
    C
    D
    E
    F
    G
    H
    I
    J
    K
    1
    70%
    11%
    1%
    9%
    7%
    2%
    2
    0%
    49%
    2%
    8%
    31%
    10%
    3
    0%
    0%
    0%
    43%
    43%
    14%
    4
    0%
    0%
    0%
    0%
    75%
    25%
    5
    0%
    20%
    2%
    38%
    30%
    10%
    6
    62%
    14%
    1%
    11%
    9%
    3%
    7
    62%
    14%
    1%
    11%
    9%
    3%
    8
    9
    File
    Case
    Total
    ClientA
    ClientB
    ClientC
    ClientD
    ClientE
    ClientF
    10
    Case #1
    5575
    $ 26.00
    $ 18.20
    $ 2.86
    $ 0.26
    $ 2.34
    $ 1.82
    $ 0.52
    E10 and across and down: =IF(E1=0, 0, ROUND(E1 * ($C10 - SUM($D10:D10)) / (1 - SUM($D1:D1)), 2))
    11
    Case #2
    5582
    $ 91.00
    $ -
    $ 44.59
    $ 1.82
    $ 7.28
    $ 28.21
    $ 9.10
    12
    Case #3
    5546
    $ 32.50
    $ -
    $ -
    $ -
    $ 13.98
    $ 13.97
    $ 4.55
    13
    Case #4
    5553
    $ 19.50
    $ -
    $ -
    $ -
    $ -
    $ 14.63
    $ 4.87
    14
    Case #5
    5572
    $ 13.00
    $ -
    $ 2.60
    $ 0.26
    $ 4.94
    $ 3.90
    $ 1.30
    15
    Case #6
    5410
    $ -
    $ -
    $ -
    $ -
    $ -
    $ -
    $ -
    16
    Case #7
    5410
    $ -
    $ -
    $ -
    $ -
    $ -
    $ -
    $ -
    17
    $ 182.00
    $ 18.20
    $ 50.05
    $ 2.34
    $ 28.54
    $ 62.53
    $ 20.34
    C17 and across: =SUBTOTAL(9,C10:C16)
    Last edited by shg; 01-12-2015 at 08:28 PM.
    Entia non sunt multiplicanda sine necessitate

  10. #10
    Forum Contributor
    Join Date
    10-30-2013
    Location
    Melbourne
    MS-Off Ver
    Excel 2013
    Posts
    173

    Re: The dreaded rounding problem regarding dollars and cents.

    I agree with @shg that embedding the percentages in the formula is not good. You should really have a separate panel for that...
    If I understand it correctly, @shg solution will always distribute the error to the last participant.
    Attached is another solution that distributes the error randomly across the participating invoicees (I still don't understand if they are suppliers or clients).
    It does a raw calculation, then picks one of the participants for each Case and then deducts the error from the selected one.
    I set it out with helper rows so you can see how it works. You would have to come up with a way of freezing the selection otherwise it will randomly choose different recipients of the error.

    The second version has a small change to the highlighting is all... I can't see how to remove the previous version.
    Attached Files Attached Files
    Last edited by coolblue; 01-12-2015 at 09:56 PM.

  11. #11
    Forum Expert shg's Avatar
    Join Date
    06-20-2007
    Location
    The Great State of Texas
    MS-Off Ver
    2010, 2019
    Posts
    40,689

    Re: The dreaded rounding problem regarding dollars and cents.

    shg solution will always distribute the error to the last participant
    No. If that were true, the formulas would be the same as before except for the last column, which would gross up the amount.

  12. #12
    Forum Contributor
    Join Date
    10-30-2013
    Location
    Melbourne
    MS-Off Ver
    Excel 2013
    Posts
    173

    Re: The dreaded rounding problem regarding dollars and cents.

    If I understand it correctly, @shg solution will always distribute the error to the last participant.
    Is the actual quote...

    But anyway, the @shg solution is way more mathematically elegant and takes a bit of work to understand how it works.
    It seems like your calculating a corrected total which is (the total) times (the actual remaining total) divided by (the remaining total calculated by the remaining percentages)
    Where "the remaining" means the ones to the right of the value being calculated.
    Which is quite brilliant.
    Is that right?

  13. #13
    Forum Expert shg's Avatar
    Join Date
    06-20-2007
    Location
    The Great State of Texas
    MS-Off Ver
    2010, 2019
    Posts
    40,689

    Re: The dreaded rounding problem regarding dollars and cents.

    It seems like your calculating a corrected total which is (the total) times (the actual remaining total) divided by (the remaining total calculated by the remaining percentages)
    Exactly .

  14. #14
    Registered User
    Join Date
    01-12-2015
    Location
    Jackson
    MS-Off Ver
    Microsoft Office 2007
    Posts
    8

    Re: The dreaded rounding problem regarding dollars and cents.

    Ok Guy! Let me digest what your saying and I will get back to you.

    To answer coolblue, basically I am providing a service to a customer and billing for that service. And it is 6 separate entities/individuals that split the cost of paying for that service billed on a invoice.

    Thanks again!

  15. #15
    Registered User
    Join Date
    01-12-2015
    Location
    Jackson
    MS-Off Ver
    Microsoft Office 2007
    Posts
    8

    Re: The dreaded rounding problem regarding dollars and cents.

    SHG and Coolblue,
    Thank you for the support. I reviewed the spreadsheets provided and was able to replicate the formulas to suit my purposes on a much larger scale than the example provided. Thank you. I have to admit I do not fully understand portions of the formula but I will attempt to figure that out this weekend.

    Another question. Is there a way to turn off the automatic reallocation once I am finished? I have placed filters and subtotals to my spreadsheet because there will be times when I will go back and filter for groups of specific cases and or dollar amounts etc. But it appears every time I make a change to a cell or use a filter, the random reallocation kicks in and changes the allocations ever so slightly.

  16. #16
    Forum Expert shg's Avatar
    Join Date
    06-20-2007
    Location
    The Great State of Texas
    MS-Off Ver
    2010, 2019
    Posts
    40,689

    Re: The dreaded rounding problem regarding dollars and cents.

    It's impossible to answer in the abstract. Post a workbook that illustrates the problem.

  17. #17
    Registered User
    Join Date
    01-12-2015
    Location
    Jackson
    MS-Off Ver
    Microsoft Office 2007
    Posts
    8

    Re: The dreaded rounding problem regarding dollars and cents.

    If I change of filter the spreadsheet, the data in Column O will change and reallocate.
    Attached Files Attached Files

  18. #18
    Forum Expert shg's Avatar
    Join Date
    06-20-2007
    Location
    The Great State of Texas
    MS-Off Ver
    2010, 2019
    Posts
    40,689

    Re: The dreaded rounding problem regarding dollars and cents.

    Is that coolblue's suggestion? If so, I'll let him respond.

  19. #19
    Forum Contributor
    Join Date
    10-30-2013
    Location
    Melbourne
    MS-Off Ver
    Excel 2013
    Posts
    173

    Re: The dreaded rounding problem regarding dollars and cents.

    Firstly I would repeat that shg's solution is far more elegant than mine, although I don't fully understand it. I'm sure that shg would not have offered it if there was any bias in the allocation, so I assume there is not. Using his solution I don't think there is any need to freeze the formlae.
    Of course its best for him to answer these points!

    To answer your question about the sheet you uploaded, there are 2 ways to do it.
    1. Select the formulas in the right-most section, for the row that you want to freeze and copy then paste special, Values. (CONTROL-C followed by ALT-E then S then V then ENTER).
    Rounding Example.png
    2. Do the same thing for the Distribute to column in the third group of columns from the right.
    Rounding Example 2.png
    This will replace the formulas in that section with the calculated values hence freezing them.
    The second method is easier but potentially confusing since the results will be inconsistent with the formulae to the left.

  20. #20
    Registered User
    Join Date
    01-12-2015
    Location
    Jackson
    MS-Off Ver
    Microsoft Office 2007
    Posts
    8

    Re: The dreaded rounding problem regarding dollars and cents.

    Hey Guys! Thanks for all your help. It was easier than I first thought. I need to stop working on this at the end of the day. I set the spreadsheet to manual calculation and will hit the calc button when I am ready. I can then filter all I want without any changes. Thanks again for your expertise.

+ 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. Splitting dollars and cents
    By ncbuilder01 in forum Excel General
    Replies: 8
    Last Post: 01-20-2018, 10:39 PM
  2. Replies: 7
    Last Post: 02-14-2015, 11:29 PM
  3. [SOLVED] how do i sum dollars & cents in different columns
    By Eric in forum Excel Programming / VBA / Macros
    Replies: 6
    Last Post: 11-20-2005, 09:40 PM
  4. [SOLVED] Separating dollars and cents
    By alison via OfficeKB.com in forum Excel Formulas & Functions
    Replies: 5
    Last Post: 03-30-2005, 06:06 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