kyddrivers
Board Regular
- Joined
- Mar 22, 2013
- Messages
- 59
- Office Version
- 365
- Platform
- Windows
I am in need of a formula to return a week of month value. Starting with the 15th of the month as 1, and repeat for 7 days or rows and then increment until we get to the 15th of the next month and restart back at 1.
I have INT((ROW()-ROW($F$1))/7)+1) to get the 7 rows and increment by 1, but I am failing to get the reset when I hit the 15th. If I add =IF(DAY(C34)=15, 1, to beginning it returns a 1 on the 15 and goes back to incrementing.
example: Formula in column E =IF(DAY(C28)=15, 1, INT((ROW()-ROW($E$28))/7)+1)
Here is what happens when I get to Feb 15th:
How do I reset back to 1 starting on the 15th of the month?
Thanks in advance!
I have INT((ROW()-ROW($F$1))/7)+1) to get the 7 rows and increment by 1, but I am failing to get the reset when I hit the 15th. If I add =IF(DAY(C34)=15, 1, to beginning it returns a 1 on the 15 and goes back to incrementing.
example: Formula in column E =IF(DAY(C28)=15, 1, INT((ROW()-ROW($E$28))/7)+1)
Col C | Col E |
15-Jan-22 | 1 |
16-Jan-22 | 1 |
17-Jan-22 | 1 |
18-Jan-22 | 1 |
19-Jan-22 | 1 |
20-Jan-22 | 1 |
21-Jan-22 | 1 |
22-Jan-22 | 2 |
23-Jan-22 | 2 |
Here is what happens when I get to Feb 15th:
11-Feb-22 | 4 |
12-Feb-22 | 5 |
13-Feb-22 | 5 |
14-Feb-22 | 5 |
15-Feb-22 | 1 |
16-Feb-22 | 5 |
17-Feb-22 | 5 |
How do I reset back to 1 starting on the 15th of the month?
Thanks in advance!