+ Reply to Thread
Results 1 to 6 of 6

Adding cricket overs - base 6

  1. #1
    Registered User
    Join Date
    09-29-2007
    Location
    Australia
    MS-Off Ver
    2013
    Posts
    55

    Adding cricket overs - base 6

    I've got an array formula to add a column of numbers, some with one decimal place. The complex part is that the decimal isn't 1/10th, it's 1/6th. Cricket overs count 0.1, 0.2, 0.3, 0.4, 0.5, 1.0... and so on. So 0.3 + 0.3 = 1.0

    =SUM(INT(J5:J24))+INT(SUM(MOD(J5:J24,1))*10/6)+(MOD(SUM(MOD(J5:J24,1)*10/6),1))*6/10

    I have just noticed that sometimes, if the first two numbers both have a point three (eg. 5.3 and 6.3) it shows 11.6 instead of 12. It works every other time.

    Anyone have any idea why this happens or how to fix?
    Thanks

  2. #2
    Forum Expert
    Join Date
    01-15-2007
    Location
    Brisbane, Australia
    MS-Off Ver
    2007
    Posts
    6,591
    Hi

    Try this. It has to be array entered with the ctrl, shift and enter keys.

    =SUM(INT(J5:J24))+INT(SUM(J5:J24-INT(J5:J24))/0.6)+MOD(SUM(J5:J24-INT(J5:J24)),0.6)


    rylo

  3. #3
    Registered User
    Join Date
    09-29-2007
    Location
    Australia
    MS-Off Ver
    2013
    Posts
    55
    Thanks for the help rylo.

    That works but the problem remains. For some reason, 5.3 + 5.3 = 10.6

    If you put 5.4 and 5.2, it's says 11, which is correct. But whenever the only decimals are 3s it goes for the old .6

  4. #4
    Forum Expert Paul's Avatar
    Join Date
    02-05-2007
    Location
    Wisconsin
    MS-Off Ver
    2016/365
    Posts
    6,885
    Hi cricket_stoner,

    Try this modified formula:
    Please Login or Register  to view this content.
    I think the issue was due to Excel's use of binary math, and that 0.6 / 0.6 does not equal 1 in Excel (it's actually 0.99999999999, which when you take the INT of 0.999999 you get 0 instead of 1).
    Last edited by Paul; 01-07-2008 at 02:59 AM.

  5. #5
    Forum Expert daddylonglegs's Avatar
    Join Date
    01-14-2006
    Location
    England
    MS-Off Ver
    2016
    Posts
    14,675
    Two other possibilities which don't need to be "array entered"

    =INT(SUMPRODUCT(J5:J24*10-INT(J5:J24)*4)/6)+MOD(SUMPRODUCT(J5:J24*10-INT(J5:J24)*4),6)/10

    or, if you don't mind using the Analysis ToolPak add-in function DOLLARFR

    =DOLLARFR(SUMPRODUCT(J5:J24*10-INT(J5:J24)*4)/6,6)

  6. #6
    Registered User
    Join Date
    08-30-2017
    Location
    Toowoomba, Australia
    MS-Off Ver
    Don't know
    Posts
    3

    Re: Adding cricket overs - base 6

    Hey there,

    Have you got a formula to add just 2 different cells? Like F30 says 1.4 and F91 says 1.4 I want it to say 3.2 in another cell.

    Obviously I'm talking about overs. Cause on my template I'm trying to add a bowlers 1st innings and also his 2nd innings to have the total overs in the match.

    I have this formula for the team total overs and i've fiddled around with the formula but I can't get it to work for just 2 cells. Like the SUMPRODUCT(G4:G9 I just want something easy like B3 + B40 with the rest of what I need in the formula. I don't want to use this symbol :

    =INT(SUMPRODUCT(F117:F122*10-INT(F117:F122)*4)/6)+MOD(SUMPRODUCT(F117:F122*10-INT(F117:F122)*4),6)/10

    Also to note that these cells are on a different sheet. So i'll be putting in ='1st Test'!F30+'1st Test'!F91 and so on. I just need help with the MOD and INT formula because I'm very new to them and I have no idea on how to type it out on my own.

    Thank you Paul.

+ 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