SaraWitch
Active Member
- Joined
- Sep 29, 2015
- Messages
- 370
- Office Version
- 365
- Platform
- Windows
Hello peeps,
I call upon your expertise again!
I have a start date in A2 and an end date in B2. I want a formula in C2 to return the first Monday in April before the A2 date. I also want a formula in D2 (E2 from example below) to return the date of the first Monday in April of the current year if no date is entered in B2 but to return the date in B2 if one is entered.
For example:
I can return the first Monday of a date's month (column D), but not April's. I've also tried breaking down the dates into years first, but I'm ending up with more columns than I feel I need.
Any help would be gratefully received.
I call upon your expertise again!
I have a start date in A2 and an end date in B2. I want a formula in C2 to return the first Monday in April before the A2 date. I also want a formula in D2 (E2 from example below) to return the date of the first Monday in April of the current year if no date is entered in B2 but to return the date in B2 if one is entered.
For example:
Auto move row.xlsm | |||||||
---|---|---|---|---|---|---|---|
A | B | C | D | E | |||
1 | Start Date | End Date | First Monday in April before Start Date | I can get first Monday in month, but not April's | First April Monday in Current Year if B2 empty or B2 date | ||
2 | 11/11/2023 | Should be 03/04/2023 | 06/11/2023 | Should be 03/04/2023 | |||
3 | 10/10/2021 | Should be 05/04/2021 | 04/10/2021 | Should be 03/04/2023 | |||
4 | 03/01/2024 | Should be 03/04/2023 | 01/01/2024 | Should be 03/04/2023 | |||
5 | 12/12/2022 | 10/10/2023 | Should be 04/04/2022 | 05/12/2022 | Should be 10/10/2023 | ||
6 | 04/04/2022 | Should be 04/04/2022 | 04/04/2022 | Should be 03/04/2023 | |||
7 | 03/04/2022 | Should be 05/04/2021 | 04/04/2022 | Should be 03/04/2023 | |||
8 | 02/02/2023 | 04/04/2023 | Should be 03/04/2023 | 06/02/2023 | Should be 04/04/2023 | ||
9 | 29/09/2022 | 03/01/2024 | Should be 04/04/2022 | 05/09/2022 | Should be 03/01/2024 | ||
10 | 29/09/2022 | Should be 04/04/2022 | 05/09/2022 | Should be 03/04/2023 | |||
Sheet3 |
Cell Formulas | ||
---|---|---|
Range | Formula | |
D2:D10 | D2 | =IF(A2=0,"",A2-DAY(A2)+8-WEEKDAY(A2-DAY(A2)+6)) |
Cells with Data Validation | ||
---|---|---|
Cell | Allow | Criteria |
A1:E10 | Any value |
I can return the first Monday of a date's month (column D), but not April's. I've also tried breaking down the dates into years first, but I'm ending up with more columns than I feel I need.
Any help would be gratefully received.