• Thanks for sharing!

    I was on a project where we needed to institue "penny rounding" in our detail tables so that the sum of the details in an invoicing detail report was consistent with various subtotals and grand totals. I specified how the rounding was to occur using Excel and pretty much followed the general approach you described in your article (do the "normal" math, sum the details, find the delta compared to the expected amount, and then apply the delta to the largest record). The developer I was working with created a stp to handle based on what I did in Excel, using the "messy" version that you described.

    In a different context, where the delta was deemed significant, we also had a requirement to evenly "sprinkle" the delta across all items that were getting the allocation... IIRC I think that I only did that in Excel and we never implemented a program for that.