Hi Team,
I have a requirement for macro.
I am using this at many places, presently doing this with formula and other tools. For reusability I need to use a macro.
input:
2022-11-01
2022-11-02
2022-11-03
2022-11-04
2022-11-05
2022-11-06
2022-11-07
2022-11-08
2022-11-09
2022-11-10
2022-11-11
2022-11-12
2022-11-13
2022-11-14
2022-11-15
2022-11-16
2022-11-17
2022-11-18
2022-11-19
2022-11-20
2022-11-21
2022-11-22
Output1; T1 date is currentday-1 businessday, T5 date is currentdate-6businessday
| Date | T1 Date | T5 Date |
| 01-11-2022 | 22-11-2022 | 16-11-2022 |
| 02-11-2022 | 22-11-2022 | 16-11-2022 |
| 03-11-2022 | 22-11-2022 | 16-11-2022 |
| 04-11-2022 | 22-11-2022 | 16-11-2022 |
| 05-11-2022 | 22-11-2022 | 16-11-2022 |
| 06-11-2022 | 22-11-2022 | 16-11-2022 |
| 07-11-2022 | 22-11-2022 | 16-11-2022 |
| 08-11-2022 | 22-11-2022 | 16-11-2022 |
| 09-11-2022 | 22-11-2022 | 16-11-2022 |
| 10-11-2022 | 22-11-2022 | 16-11-2022 |
| 11-11-2022 | 22-11-2022 | 16-11-2022 |
| 12-11-2022 | 22-11-2022 | 16-11-2022 |
| 13-11-2022 | 22-11-2022 | 16-11-2022 |
| 14-11-2022 | 22-11-2022 | 16-11-2022 |
| 15-11-2022 | 22-11-2022 | 16-11-2022 |
| 16-11-2022 | 22-11-2022 | 16-11-2022 |
| 17-11-2022 | 22-11-2022 | 16-11-2022 |
| 18-11-2022 | 22-11-2022 | 16-11-2022 |
| 19-11-2022 | 22-11-2022 | 16-11-2022 |
| 20-11-2022 | 22-11-2022 | 16-11-2022 |
| 21-11-2022 | 22-11-2022 | 16-11-2022 |
| 22-11-2022 | 22-11-2022 | 16-11-2022 |
Output2:
| StartDate | Day | RecordID |
| 22-11-2022 | Tue | 1 |
| 21-11-2022 | Mon | 2 |
| 18-11-2022 | Fri | 3 |
| 17-11-2022 | Thu | 4 |
| 16-11-2022 | Wed | 5 |
Solved! Go to Solution.
thanks for sharing this macro. I am able to write my small piece of macro with your file content and idea help. appreciate it.
