Woofy_McWoof_Woof
Board Regular
- Joined
- Oct 7, 2016
- Messages
- 60
- Office Version
- 365
- Platform
- Windows
Hi, I posted an earlier version of this and though partly resolved, it was suggested I post a separate question to hopefully finish it off.
In the attached, I'd like to count as either one or zero if a lookup shows an event in that particular half hour. The formula in the attached (col G and H) returns the first and last half hour ok but I'd also like the half hours in-between to be flagged as one as well. Columns L and M shows this manually but i'd like a formula that i can drag down for the whole year as I have hundreds of affected half hours in my master spreadsheet and do not really want to count them individually. Thanks for any help that can be provided.
In the attached, I'd like to count as either one or zero if a lookup shows an event in that particular half hour. The formula in the attached (col G and H) returns the first and last half hour ok but I'd also like the half hours in-between to be flagged as one as well. Columns L and M shows this manually but i'd like a formula that i can drag down for the whole year as I have hundreds of affected half hours in my master spreadsheet and do not really want to count them individually. Thanks for any help that can be provided.
lookup_test.xlsx | ||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
A | B | C | D | E | F | G | H | I | J | K | L | M | N | |||
1 | Start | End | Start lookup | End lookup | Date | Count of start | Count of end | Sum of count | Date | Count of start | Count of end | Sum of count | ||||
2 | 01 May 2022 05:42:20 | 01 May 2022 07:18:20 | 01/05/2022 05:30 | 01/05/2022 07:00 | 01-May-2022 05:00 | 0 | 0 | 0 | 01-May-2022 05:00 | 0 | 0 | 0 | ||||
3 | 01 May 2022 09:02:49 | 01 May 2022 12:39:49 | 01/05/2022 09:00 | 01/05/2022 12:30 | 01-May-2022 05:30 | 1 | 0 | 1 | 01-May-2022 05:30 | 1 | 0 | 1 | ||||
4 | 01 May 2022 14:48:02 | 01 May 2022 17:56:02 | 01/05/2022 14:30 | 01/05/2022 17:30 | 01-May-2022 06:00 | 0 | 0 | 0 | 01-May-2022 06:00 | 0 | 1 | 1 | ||||
5 | 01 May 2022 19:48:02 | 01 May 2022 19:56:02 | 01/05/2022 19:30 | 01/05/2022 19:30 | 01-May-2022 06:30 | 0 | 0 | 0 | 01-May-2022 06:30 | 0 | 1 | 1 | ||||
6 | 01-May-2022 07:00 | 0 | 1 | 1 | 01-May-2022 07:00 | 0 | 1 | 1 | ||||||||
7 | 01-May-2022 07:30 | 0 | 0 | 0 | 01-May-2022 07:30 | 0 | 0 | 0 | ||||||||
8 | 01-May-2022 08:00 | 0 | 0 | 0 | 01-May-2022 08:00 | 0 | 0 | 0 | ||||||||
9 | 01-May-2022 08:30 | 0 | 0 | 0 | 01-May-2022 08:30 | 0 | 0 | 0 | ||||||||
10 | 01-May-2022 09:00 | 1 | 0 | 1 | 01-May-2022 09:00 | 1 | 0 | 1 | ||||||||
11 | 01-May-2022 09:30 | 0 | 0 | 0 | 01-May-2022 09:30 | 0 | 1 | 1 | ||||||||
12 | 01-May-2022 10:00 | 0 | 0 | 0 | 01-May-2022 10:00 | 0 | 1 | 1 | ||||||||
13 | 01-May-2022 10:30 | 0 | 0 | 0 | 01-May-2022 10:30 | 0 | 1 | 1 | ||||||||
14 | 01-May-2022 11:00 | 0 | 0 | 0 | 01-May-2022 11:00 | 0 | 1 | 1 | ||||||||
15 | 01-May-2022 11:30 | 0 | 0 | 0 | 01-May-2022 11:30 | 0 | 1 | 1 | ||||||||
16 | 01-May-2022 12:00 | 0 | 0 | 0 | 01-May-2022 12:00 | 0 | 1 | 1 | ||||||||
17 | 01-May-2022 12:30 | 0 | 1 | 1 | 01-May-2022 12:30 | 0 | 1 | 1 | ||||||||
18 | 01-May-2022 13:00 | 0 | 0 | 0 | 01-May-2022 13:00 | 0 | 0 | 0 | ||||||||
19 | 01-May-2022 13:30 | 0 | 0 | 0 | 01-May-2022 13:30 | 0 | 0 | 0 | ||||||||
20 | 01-May-2022 14:00 | 0 | 0 | 0 | 01-May-2022 14:00 | 0 | 0 | 0 | ||||||||
21 | 01-May-2022 14:30 | 1 | 0 | 1 | 01-May-2022 14:30 | 1 | 1 | 2 | ||||||||
22 | 01-May-2022 15:00 | 0 | 0 | 0 | 01-May-2022 15:00 | 0 | 1 | 1 | ||||||||
23 | 01-May-2022 15:30 | 0 | 0 | 0 | 01-May-2022 15:30 | 0 | 1 | 1 | ||||||||
24 | 01-May-2022 16:00 | 0 | 0 | 0 | 01-May-2022 16:00 | 0 | 1 | 1 | ||||||||
25 | 01-May-2022 16:30 | 0 | 0 | 0 | 01-May-2022 16:30 | 0 | 1 | 1 | ||||||||
26 | 01-May-2022 17:00 | 0 | 0 | 0 | 01-May-2022 17:00 | 0 | 1 | 1 | ||||||||
27 | 01-May-2022 17:30 | 0 | 1 | 1 | 01-May-2022 17:30 | 0 | 1 | 1 | ||||||||
28 | 01-May-2022 18:00 | 0 | 0 | 0 | 01-May-2022 18:00 | 0 | 0 | 0 | ||||||||
29 | 01-May-2022 18:30 | 0 | 0 | 0 | 01-May-2022 18:30 | 0 | 0 | 0 | ||||||||
30 | 01-May-2022 19:00 | 0 | 0 | 0 | 01-May-2022 19:00 | 0 | 0 | 0 | ||||||||
31 | 01-May-2022 19:30 | 1 | 1 | 2 | 01-May-2022 19:30 | 1 | 1 | 2 | ||||||||
32 | 01-May-2022 20:00 | 0 | 0 | 0 | 01-May-2022 20:00 | 0 | 0 | 0 | ||||||||
33 | 01-May-2022 20:30 | 0 | 0 | 0 | 01-May-2022 20:30 | 0 | 0 | 0 | ||||||||
34 | 01-May-2022 21:00 | 0 | 0 | 0 | 01-May-2022 21:00 | 0 | 0 | 0 | ||||||||
35 | 01-May-2022 21:30 | 0 | 0 | 0 | 01-May-2022 21:30 | 0 | 0 | 0 | ||||||||
36 | 01-May-2022 22:00 | 0 | 0 | 0 | 01-May-2022 22:00 | 0 | 0 | 0 | ||||||||
37 | 01-May-2022 22:30 | 0 | 0 | 0 | 01-May-2022 22:30 | 0 | 0 | 0 | ||||||||
38 | 01-May-2022 23:00 | 0 | 0 | 0 | 01-May-2022 23:00 | 0 | 0 | 0 | ||||||||
39 | 01-May-2022 23:30 | 0 | 0 | 0 | 01-May-2022 23:30 | 0 | 0 | 0 | ||||||||
Sheet1 |
Cell Formulas | ||
---|---|---|
Range | Formula | |
C2:D5 | C2 | =VLOOKUP(A2,$F$2:$F$39,1,TRUE) |
G2:G39 | G2 | =COUNTIF($C$2:$C$2987,F2) |
H2:H39 | H2 | =COUNTIF($D$2:$D$2987,F2) |
I2:I39,N2:N39 | I2 | =SUM(G2:H2) |
Cells with Conditional Formatting | ||||
---|---|---|---|---|
Cell | Condition | Cell Format | Stop If True | |
N2:N39 | Cell Value | >0 | text | NO |
L2:M39 | Cell Value | >0 | text | NO |
I2:I39 | Cell Value | >0 | text | NO |
G2:H39 | Cell Value | >0 | text | NO |