Round time to nearest 15min interval in Excel

前端 未结 11 2461
伪装坚强ぢ
伪装坚强ぢ 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:31

    Assuming you have 2 date-times and you want to find the total and round up to the nearest 15 minutes:

    A1 = 7/10/2014 16:10    
    A2 = 7/10/2014 17:49
    

    First get the total in decimal hours:

    A3:   =(A2-A1)*24
    

    Then you can round up to the nearest quarter hour:

    A4:  =Ceiling(A3, .25)
    

    Or do it all on one cell:

    A3:  =Ceiling((A2-A1)*24, .25)
    

提交回复
热议问题