ItalianPlatinum
Well-known Member
- Joined
- Mar 23, 2017
- Messages
- 774
- Office Version
- 365
- 2019
- Platform
- Windows
Hello - very simply here. I am trying to fill a range of data so my code with loop and run for each day in between. I need to extract or run VBA for the 3rd to last BD of last month each day until the 4th to last BD of Current month. see below for an example
Book2 | |||||||
---|---|---|---|---|---|---|---|
A | B | C | D | E | |||
1 | Date Range | Today | 11/24/2020 | ||||
2 | 10/28/2020 | 3rd to last BD of Last Month | 10/28/2020 | ||||
3 | 10/29/2020 | 4th to last BD of Current Month | 11/25/2020 | ||||
4 | 10/30/2020 | 4th to last BD of Next Month | 12/28/2020 | ||||
5 | 10/31/2020 | ||||||
6 | 11/1/2020 | Days Between Current Month and Next mount | 34 | ||||
7 | 11/2/2020 | ||||||
8 | 11/3/2020 | ||||||
9 | 11/4/2020 | ||||||
10 | 11/5/2020 | ||||||
11 | 11/6/2020 | ||||||
12 | 11/7/2020 | ||||||
13 | 11/8/2020 | ||||||
14 | 11/9/2020 | ||||||
15 | 11/10/2020 | ||||||
16 | 11/11/2020 | ||||||
17 | 11/12/2020 | ||||||
18 | 11/13/2020 | ||||||
19 | 11/14/2020 | ||||||
20 | 11/15/2020 | ||||||
21 | 11/16/2020 | ||||||
22 | 11/17/2020 | ||||||
23 | 11/18/2020 | ||||||
24 | 11/19/2020 | ||||||
25 | 11/20/2020 | ||||||
26 | 11/21/2020 | ||||||
27 | 11/22/2020 | ||||||
28 | 11/23/2020 | ||||||
29 | 11/24/2020 | ||||||
30 | 11/25/2020 | STOP | |||||
Sheet1 |
Cell Formulas | ||
---|---|---|
Range | Formula | |
E1 | E1 | =TODAY() |
E2 | E2 | =WORKDAY(EOMONTH(E1,-1)+1,-3) |
E3 | E3 | =WORKDAY(EOMONTH(E1,0)+1,-4) |
E4 | E4 | =WORKDAY(EOMONTH(E1,1)+1,-4) |
E6 | E6 | =E4-E3+1 |
A2 | A2 | =E2 |
A3:A30 | A3 | =A2+1 |