Round time to nearest 15min interval in Excel

前端 未结 11 2346
伪装坚强ぢ
伪装坚强ぢ 2020-12-30 03:20

I\'ve an excel spreadsheet with a column which has the date and time of a particular event. I would like to round this to the nearest 15 minute interval so that I can count

相关标签:
11条回答
  • 2020-12-30 03:38

    If time is in cell A1:

    =ROUND(A1*(24*60/15),0)/(24*60/15)
    

    (Rounding to nearest 15 minute increment)

    or

    =INT(A1*(24*60/15),0)/(24*60/15)
    

    (Rounding down to last 15 minute increment)

    0 讨论(0)
  • 2020-12-30 03:39

    Simpler ??

    =B2-MOD(B2,15/24/60)

    Knowing that for Excel 1 day = 24 hrs = 1,
    15/24/60 (= 0.0104166666666667) is the numeric equivalent equivalent of 15 min.

    0 讨论(0)
  • 2020-12-30 03:39

    This worked for me

    =CEILING(((MOD(D16-C16;1))*24);0,25)
    

    It calculates the time difference of two different times C16 and D16 in hours first. Then rounds up.

    0 讨论(0)
  • 2020-12-30 03:44

    mround takes time values as strings, so you can use

    =mround(a1,"0:15")
    

    which I think is the shortest and clearest method.

    0 讨论(0)
  • 2020-12-30 03:49

    Just found a helpful function, MROUND, which is available in Excel 2007 and as an Analysis add-in.

    Assuming your time is in B2, with a number like 8.43 to represent 8 hours, 25.8 minutes:

    =MROUND(MOD(B2,1)*60,15)
    

    the MOD(B2,1) would extract the fractional 0.43; the *60 would convert to 25.8; and the MROUND would round you to the nearest multiple of 15, namely 30.

    0 讨论(0)
提交回复
热议问题