cpeters5
asked on
Date time format in Excel
I have a date time column in column A with the following (sorted) values
10/1/2011 1:31:00
10/1/2011 21:18:00
10/1/2011 22:51:00
.
.
10/2/2011 1:32:00
10/2/2011 2:56:00
I want to assign bin of step size 15 minutes, to values in column A. The bin assignment formula I was using was
How do I include the date in the formula to get assign different bin to the time in different date?
pax
10/1/2011 1:31:00
10/1/2011 21:18:00
10/1/2011 22:51:00
.
.
10/2/2011 1:32:00
10/2/2011 2:56:00
I want to assign bin of step size 15 minutes, to values in column A. The bin assignment formula I was using was
time(hour(A2),round((minute(A2)/60)*60/15,0)*15,0)
However, this formula ignores the date part. For instance, it will assign the same bin to 10/1/2011 1:31:00 and 10/2/2011 1:32:00.How do I include the date in the formula to get assign different bin to the time in different date?
pax
ASKER
Not quite. This works the same way as the formula I used. Since it disregard the day has changed to the next day.
=MROUND(11/03/2012 4:09) and =MROUND(11/04/2012 4:09) both give 4:15.
I need a function that produces 28:15 for the second date (11/04/2012 4:09)
=MROUND(11/03/2012 4:09) and =MROUND(11/04/2012 4:09) both give 4:15.
I need a function that produces 28:15 for the second date (11/04/2012 4:09)
Format the cell with MROUND as date and time. You will see that it has a different date.
Data MROUND formula
10/1/2011 1:31 10/1/2011 1:30
10/1/2011 21:18 10/1/2011 21:15
10/1/2011 22:52 10/1/2011 22:45
10/2/2011 1:32 10/2/2011 1:30
10/2/2011 2:56 10/2/2011 3:00
Data MROUND formula
10/1/2011 1:31 10/1/2011 1:30
10/1/2011 21:18 10/1/2011 21:15
10/1/2011 22:52 10/1/2011 22:45
10/2/2011 1:32 10/2/2011 1:30
10/2/2011 2:56 10/2/2011 3:00
ASKER CERTIFIED SOLUTION
membership
Create a free account to see this answer
Signing up is free and takes 30 seconds. No credit card required.
ASKER
Very clever! Yes it works perfectly.
Thank you,
pax
Thank you,
pax
=MROUND(A2,15/1440)