I have a main folder on my desktop, lets call it 'C:\Users\Desktop\Update'. Within that folder I have 3 additional folder lets call them 'FY21', 'FY22' and 'FY23'. Within each of those subfolders there are 5 XLSX files. I have created a code for each file based on the subfolder they are in. I am trying to run a single macro that will go through the subfolders and run the codes I've created based on the subfolder.
The files within each subfolder have a consistent partial filename followed by unique numbers that are different each week.
Main folder location > 'C:\Users\Desktop\Update'
Sub folder names > 'FY21', 'FY22' and 'FY23'
Partial Names within EACH subfolder > Apple_1234567890, Oranges_9875342716, Berries_4937405736, Lemons_9283741092, Pears_9362537120
FY21 Apple Macro ran only on file name 'Apple' within FY21 sub folder
FY22 Apple Macro ran only on file name 'Apple' within FY22 sub folder
FY23 Apple Macro ran only on file name 'Apple' within FY23 sub folder
FY21 Oranges Macro ran only on file name 'Oranges' within FY21 sub folder
FY22 Oranges Macro ran only on file name 'Oranges' within FY22 sub folder
FY23 Oranges Macro ran only on file name 'Oranges' within FY23 sub folder
etc.
The files within each subfolder have a consistent partial filename followed by unique numbers that are different each week.
Main folder location > 'C:\Users\Desktop\Update'
Sub folder names > 'FY21', 'FY22' and 'FY23'
Partial Names within EACH subfolder > Apple_1234567890, Oranges_9875342716, Berries_4937405736, Lemons_9283741092, Pears_9362537120
FY21 Apple Macro ran only on file name 'Apple' within FY21 sub folder
FY22 Apple Macro ran only on file name 'Apple' within FY22 sub folder
FY23 Apple Macro ran only on file name 'Apple' within FY23 sub folder
FY21 Oranges Macro ran only on file name 'Oranges' within FY21 sub folder
FY22 Oranges Macro ran only on file name 'Oranges' within FY22 sub folder
FY23 Oranges Macro ran only on file name 'Oranges' within FY23 sub folder
etc.