I am doing a spreadsheet for my baseball teams statistics. Each individual game stat is rolled up to a total area for the season. Most of this is done by just summing each individual games stats. However, there is a problem dealing with pitching. If a pitcher goes 6.2 innings in one game, and then 6.2 innings in another game. Excel will roll this up and show 12.4 innings. What I really need is for it to show 13.1 innings, since an inning is constituted by .3 outs. I know how to calculate it in my head, but not sure how to 'code' the right formula in that cell. The process would probably be something like.
1. Sum them all
2. then I need to break apart the number into the integer and fraction part.
3. Then do integer division on the fraction part, so in this case 4 integer division with 3 is 1.
4. Add that result (1) to the integer part (12), to give me 13
5. Then Modulo 3 the fractional part (4), to get 1
6. Then bring the 13 and 1 back together to get 13.1
Anyone know how I could accomplish this?
Thanks
Bookmarks