amandakay740
New Member
- Joined
- Jul 8, 2020
- Messages
- 9
- Office Version
- 365
- Platform
- Windows
My folder structure is set up like the below:
2020_05_Group1_v1
2020_05_Group1_v2
2020_05_Group1_v3
2020_05_Group1_v4
2020_06_Group1_v1
2020_06_Group1_v2
2020_05_Group2_v1
2020_05_Group2_v2
2020_05_Group2_v3
2020_06_Group2_v1
2020_06_Group2_v2
2020_06_Group1_v3
The amount of versions by group varies, I would like to have the Open Formula find the latest version in the group, for example:
In May, it would open V4 for Group 1 and V3 for Group 2
In June, it would open V2 for Group 1 and V3 for Group 2
I have 13 groups and am manually resaving them in a subfolder and using this formula to open them, it works but I know there is a better way that is beyond my current skillset. Again, the open code works but I currently use find and replace to change the date and am sub saving the workbooks into a non-version controlled naming convention.
Set x = Workbooks.Open("\\C:Desktop\2020\Group1_2020_05.xlsm", ReadOnly:=True)
2020_05_Group1_v1
2020_05_Group1_v2
2020_05_Group1_v3
2020_05_Group1_v4
2020_06_Group1_v1
2020_06_Group1_v2
2020_05_Group2_v1
2020_05_Group2_v2
2020_05_Group2_v3
2020_06_Group2_v1
2020_06_Group2_v2
2020_06_Group1_v3
The amount of versions by group varies, I would like to have the Open Formula find the latest version in the group, for example:
In May, it would open V4 for Group 1 and V3 for Group 2
In June, it would open V2 for Group 1 and V3 for Group 2
I have 13 groups and am manually resaving them in a subfolder and using this formula to open them, it works but I know there is a better way that is beyond my current skillset. Again, the open code works but I currently use find and replace to change the date and am sub saving the workbooks into a non-version controlled naming convention.
Set x = Workbooks.Open("\\C:Desktop\2020\Group1_2020_05.xlsm", ReadOnly:=True)