Formula Help (times)

yessir

Board Regular
Joined
Jun 7, 2019
Messages
91
Is there a formula that can be ran on these values to then return something similar to the sample table provided below. The objective of this formula wold be to break down minute by minute is there are 0,1,2, or more times overlapping.

Times
12:4513:01
12:5513:05

<colgroup><col width="80" style="width: 60pt; mso-width-source: userset; mso-width-alt: 2925;"><colgroup><col width="73" style="width: 55pt; mso-width-source: userset; mso-width-alt: 2669;"><tbody>
</tbody>


From this ^ to this (below)


12:4312:4412:4512:4612:4712:4812:4912:5012:5112:5212:5312:5412:5512:5612:5712:5812:5913:0013:0113:02
00111111111122222221
<colgroup><col width="64" style="width: 48pt;" span="20"> <tbody> </tbody>
 

Excel Facts

Copy a format multiple times
Select a formatted range. Double-click the Format Painter (left side of Home tab). You can paste formatting multiple times. Esc to stop
Try


A
B
C
D
E
F
G
H
I
J
K
L
M
N
O
P
Q
R
S
T
1
Times​
2
12:45​
13:01​
3
12:55​
13:05​
4
5
6
12:43​
12:44​
12:45​
12:46​
12:47​
12:48​
12:49​
12:50​
12:51​
12:52​
12:53​
12:54​
12:55​
12:56​
12:57​
12:58​
12:59​
13:00​
13:01​
13:02​
7
0​
0​
1​
1​
1​
1​
1​
1​
1​
1​
1​
1​
2​
2​
2​
2​
2​
2​
2​
1​

Formula in A7 copied across
=COUNTIFS($A$2:$A$3,"<="&A$6,$B$2:$B$3,">="&A$6)

M.
 
Upvote 0
Try



A

B

C

D

E

F

G

H

I

J

K

L

M

N

O

P

Q

R

S

T

1

Times​

2

12:45​

13:01​

3

12:55​

13:05​

4

5

6

12:43​

12:44​

12:45​

12:46​

12:47​

12:48​

12:49​

12:50​

12:51​

12:52​

12:53​

12:54​

12:55​

12:56​

12:57​

12:58​

12:59​

13:00​

13:01​

13:02​

7

0​

0​

1​

1​

1​

1​

1​

1​

1​

1​

1​

1​

2​

2​

2​

2​

2​

2​

2​

1​

<tbody>
</tbody>


Formula in A7 copied across
=COUNTIFS($A$2:$A$3,"<="&A$6,$B$2:$B$3,">="&A$6)

M.

That formula did work. Is ther a way to edit it to where it produces something like this when there are more times and places? Examples below.

Times
OOO12:4513:01
OOO12:5513:05
PPP12:5713:02
PPP12:4412:54
PPP12:4713:00
TTT12:5313:02
TTT12:5513:00
TTT
12:57
13:00
<colgroup><col width="64" style="width: 48pt;" span="2"> <col width="80" style="width: 60pt; mso-width-source: userset; mso-width-alt: 2925;"> <tbody> </tbody>



12:4312:4412:4512:4612:4712:4812:4912:5012:5112:5212:5312:5412:5512:5612:5712:5812:5913:0013:0113:02
OOO00111111111122222221
PPP01112222222211222211
TTT00000000001122333322
<colgroup><col width="64" style="width: 48pt;" span="2"> <col width="80" style="width: 60pt; mso-width-source: userset; mso-width-alt: 2925;"> <col width="73" style="width: 55pt; mso-width-source: userset; mso-width-alt: 2669;"> <col width="64" style="width: 48pt;" span="17"> <tbody> </tbody>
 
Upvote 0
All you have to do is to add a new condition

A
B
C
D
E
F
G
H
I
J
K
L
M
N
O
P
Q
R
S
T
U
1
Times​
2
OOO​
12:45​
13:01​
3
OOO​
12:55​
13:05​
4
PPP​
12:57​
13:02​
5
PPP​
12:44​
12:54​
6
PPP​
12:47​
13:00​
7
TTT​
12:53​
13:02​
8
TTT​
12:55​
13:00​
9
TTT​
12:57​
13:00​
10
11
12
13
12:43​
12:44​
12:45​
12:46​
12:47​
12:48​
12:49​
12:50​
12:51​
12:52​
12:53​
12:54​
12:55​
12:56​
12:57​
12:58​
12:59​
13:00​
13:01​
13:02​
14
OOO​
0​
0​
1​
1​
1​
1​
1​
1​
1​
1​
1​
1​
2​
2​
2​
2​
2​
2​
2​
1​
15
PPP​
0​
1​
1​
1​
2​
2​
2​
2​
2​
2​
2​
2​
1​
1​
2​
2​
2​
2​
1​
1​
16
TTT​
0​
0​
0​
0​
0​
0​
0​
0​
0​
0​
1​
1​
2​
2​
3​
3​
3​
3​
2​
1

<tbody>
</tbody>


Formula in B14 copied across and down
=COUNTIFS($A$2:$A$9,$A14,$B$2:$B$9,"<="&B$13,$C$2:$C$9,">="&B$13)

M.
 
Last edited:
Upvote 0
All you have to do is to add a new condition


A

B

C

D

E

F

G

H

I

J

K

L

M

N

O

P

Q

R

S

T

U

1

Times​

2

OOO​

12:45​

13:01​

3

OOO​

12:55​

13:05​

4

PPP​

12:57​

13:02​

5

PPP​

12:44​

12:54​

6

PPP​

12:47​

13:00​

7

TTT​

12:53​

13:02​

8

TTT​

12:55​

13:00​

9

TTT​

12:57​

13:00​

10

11

12

13

12:43​

12:44​

12:45​

12:46​

12:47​

12:48​

12:49​

12:50​

12:51​

12:52​

12:53​

12:54​

12:55​

12:56​

12:57​

12:58​

12:59​

13:00​

13:01​

13:02​

14

OOO​

0​

0​

1​

1​

1​

1​

1​

1​

1​

1​

1​

1​

2​

2​

2​

2​

2​

2​

2​

1​

15

PPP​

0​

1​

1​

1​

2​

2​

2​

2​

2​

2​

2​

2​

1​

1​

2​

2​

2​

2​

1​

1​

16

TTT​

0​

0​

0​

0​

0​

0​

0​

0​

0​

0​

1​

1​

2​

2​

3​

3​

3​

3​

2​
1

<tbody>
</tbody>


Formula in B14 copied across and down
=COUNTIFS($A$2:$A$9,$A14,$B$2:$B$9,"<="&B$13,$C$2:$C$9,">="&B$13)

M.

When using the values and times in the below table the formula doesn't seem to be assigning value to when times overlap

OOO23:495:31
OOO17:4918:20
OOO11:0311:35
OOO14:3915:04
OOO22:046:15
OOO16:0116:28
OOO9:129:37
PPP16:0816:33
PPP10:0110:26
PPP11:5712:22
TTT23:358:00
TTT20:036:37
TTT15:4916:34
TTT11:5912:44
TTT9:4810:34
TTT13:5714:44
TTT23:596:00
TTT12:3713:15
TTT20:5221:22
TTT22:587:00
TTT12:5713:27
TTT8:128:45
TTT23:538:45
TTT11:4612:30
TTT18:1118:50
TTT14:2915:07
<colgroup><col width="74" style="width: 56pt; mso-width-source: userset; mso-width-alt: 2706;" span="3"> <tbody> </tbody>
 
Upvote 0
Last edited:
Upvote 0
Upvote 0

Forum statistics

Threads
1,214,979
Messages
6,122,557
Members
449,088
Latest member
davidcom

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