Round time to nearest 15min interval in Excel

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

    Date and time rounded to nearest 15-minute period (you can always round up/round down using something like INT):

    =DATE(YEAR(B1),MONTH(B1),DAY(B1))+TIME(HOUR(B1), ROUND(MINUTE(B1)/15,0)*15, 0)
    

    Assuming cell B1 contains the date time to be rounded. This will return the number in typical serial date fashion (e.g. 39846.64444 = 02/02/2009 15:28) and you need to format your result cell as a date/time to see the value (as with all solutions to this problem). Showing date and time together is not a standard Date or Time format, you need a Custom format to do this.

提交回复
热议问题