Dates every 15 min show a Reference number

shonaart

Board Regular
Joined
Nov 1, 2004
Messages
214
Hi Guys

I have a Column A with dates & times eg: ( 2019/08/11 06:00 ) running, for example, continues for a number of days.
In Column B I would like to show a numerical number starting from 1 .... every 15min. So example from 19:12 to 19:27 column B with show a 1 then from 19:28 to 19:43 will show a 2 and so on every 15min etc

Column A
2019/08/04 Sun 19:12
2019/08/04 Sun 19:13
2019/08/04 Sun 19:18
2019/08/04 Sun 19:19
2019/08/04 Sun 19:20
2019/08/04 Sun 19:26
2019/08/04 Sun 19:27
2019/08/04 Sun 19:28
2019/08/04 Sun 19:33
2019/08/04 Sun 19:34
2019/08/04 Sun 19:38
2019/08/04 Sun 19:38
2019/08/04 Sun 19:39
2019/08/04 Sun 19:40
2019/08/04 Sun 19:42
2019/08/04 Sun 19:45
2019/08/04 Sun 19:45
2019/08/04 Sun 19:46
2019/08/04 Sun 19:46
2019/08/04 Sun 19:47

Maybe there another way of looking at this. What I am trying to achieve is to count how many dates & times ( Time stamp ) happens every 15 Minutes. So from 19:12 to 19:27 there were 7 timetamps and the second 15min it was 8 x timestamps. The Date& time is everytime a container was moved by a crane.


Thanks I would appreciate your help.
 

Excel Facts

Repeat Last Command
Pressing F4 adds dollar signs when editing a formula. When not editing, F4 repeats last command.
Try this in B1 and copied down.

=SUMPRODUCT(--(FLOOR($A$1:A1,"0:15")=FLOOR(A1,"0:15")))
 
Upvote 0
Hey

Is it something like this that you're looking for?

AB
12019/08/04 Sun 19:121
22019/08/04 Sun 19:131
32019/08/04 Sun 19:181
42019/08/04 Sun 19:191
52019/08/04 Sun 19:201
62019/08/04 Sun 19:261
72019/08/04 Sun 19:271
82019/08/04 Sun 19:282
92019/08/04 Sun 19:332
102019/08/04 Sun 19:342
112019/08/04 Sun 19:382
122019/08/04 Sun 19:392
132019/08/04 Sun 19:402
142019/08/04 Sun 19:422
152019/08/04 Sun 19:453
162019/08/04 Sun 19:453
172019/08/04 Sun 19:463
182019/08/04 Sun 19:463
192019/08/04 Sun 19:473

<tbody>
</tbody>


Where cell B1 is:
Code:
1+ROUNDDOWN((EDATE(LEFT(A1,10),0)+TIME(LEFT(MID(A1,16,99),2),MID(MID(A1,16,99),4,2),0)-43681.8)/(15/60/24),0)

And then dragged down.

The main assumption here is that the generated numbers start at 2019/08/04 19:12 (hence the -43681.8)

You can change this scalar value if needed - perhaps make a cell "StartTime" and input the starting date/time there to use as the reference.
 
Upvote 0
Hi
Thanks for the help, however, I am getting a #Value ! error and I am using it on another table with different dates.
Starting with 2019/08/08 Thu 23:33
Not sure I understand the reference you talking about ( -43681.8)

Thanks again
 
Upvote 0
Thanks Norie,
I added the formula but I am getting numbers 1,2,3 etc not showing the 15min intervals as like the table below.
Thanks again
 
Upvote 0
Hey,

Are your dates numerical or text?

Try:
=ISNUMBER(cell ref)
=ISTEXT(cell ref)

Which returns TRUE and which returns FALSE ?
 
Upvote 0
Hi

This is the formula I added
=1+ROUNDDOWN(EDATE(LEFT(D2;10)+TIME(LEFT(MID(D2;16;99);2);MID(MID(D2;16;99);4;2);0)-43681;8)/(15/60/24);0)

I left out the ,0) out the formula, if I added it, the formula says it's incorrect
 
Upvote 0
OK so that it is numerical try:

B2:
=1+ROUNDDOWN((A2-startDate)/(15/24/60),0)

Where startDate is your reference point (a named range containing the datetime value) and A2 is the first datetime entry

It should look like this:

AB
108/08/2019 23:33
208/08/2019 23:492.00

<tbody>
</tbody>

Using the formula:

AB
1startDate
208/08/2019 23:49=1+ROUNDDOWN((A2-startDate)/(15/24/60),0)

<tbody>
</tbody>
 
Upvote 0
shonaart

Can you post the expected result based on the data in your initial post?
 
Upvote 0

Forum statistics

Threads
1,214,804
Messages
6,121,652
Members
449,045
Latest member
Marcus05

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top