gooniegirl180
Board Regular
- Joined
- Aug 13, 2003
- Messages
- 152
Hi all,
I have a list of weekly dates in cells D11:D167, and switches of either a 1 (on) or 0 (off) in column E against each date.
For example:
12/5/24 0
19/5/24 0
26/5/24 1
2/6/24 1
9/6/24 1
16/6/24 1
23/6/24 1
30/6/24 0
7/7/24 0
14/7/24 0
21/7/24 1
28/7/24 1
4/8/24 0
If I am looking at this data on 2/6/24, I want to know:
(a) the last date before the switch turns off (i.e. 23/6/24)
(b) the date the switch turns back on again (i.e. 21/7/24)
(c) the date after the result in (b) that is the last date before the switch turns off again (i.e. 28/7/24)
What's the easiest way to do this, because I actually have multiple columns of switches against one set of dates, and I'll need these results for each column of switches. My example is based on the assumption that the switch for 2/6/24 is on, but if it's off, I still want to show the next "on" as answer (b), until we're actually in that week.
I'm intermediate, so if you could include a bit of an explanation on how the answer works, it will help me learn.
Thanks,
I have a list of weekly dates in cells D11:D167, and switches of either a 1 (on) or 0 (off) in column E against each date.
For example:
12/5/24 0
19/5/24 0
26/5/24 1
2/6/24 1
9/6/24 1
16/6/24 1
23/6/24 1
30/6/24 0
7/7/24 0
14/7/24 0
21/7/24 1
28/7/24 1
4/8/24 0
If I am looking at this data on 2/6/24, I want to know:
(a) the last date before the switch turns off (i.e. 23/6/24)
(b) the date the switch turns back on again (i.e. 21/7/24)
(c) the date after the result in (b) that is the last date before the switch turns off again (i.e. 28/7/24)
What's the easiest way to do this, because I actually have multiple columns of switches against one set of dates, and I'll need these results for each column of switches. My example is based on the assumption that the switch for 2/6/24 is on, but if it's off, I still want to show the next "on" as answer (b), until we're actually in that week.
I'm intermediate, so if you could include a bit of an explanation on how the answer works, it will help me learn.
Thanks,