nmgmarques
Board Regular
- Joined
- Mar 1, 2011
- Messages
- 133
- Office Version
- 365
- Platform
- Windows
Hi all.
Current file has following formulas in range D2:O8
Column D
Column E
Column F
And so forth. Each column looks for the file MB5L in a subfolder corresponding to the year and the filename has the year and month in format 20xx_xx
This year, we'll pull data from files using the same naming strategy, in a 2019 subfolder. What I am looking to do is replace the 2018's in the formulas with 2019's. Using the find and replace won't work as it asks me to point to the new file (which doesn't exist yet).
Is there any script I can use to replace all references in the range from 2018 to 2019 without the files actually existing?
Current file has following formulas in range D2:O8
Column D
Code:
=IF(ISERROR(VLOOKUP($A2;'K:\MD\_data\Fim do Mês\Data\2018\2018-01\MB5L\[MB5L.xlsx]MB5L_Resumo'!$A$1:$H$19;2;FALSE));;VLOOKUP($A2;'K:\MD\_data\Fim do Mês\Data\2018\2018-01\MB5L\[MB5L.xlsx]MB5L_Resumo'!$A$1:$H$19;2;FALSE))
Code:
=IF(ISERROR(VLOOKUP($A2;'K:\MD\_data\Fim do Mês\Data\2018\2018-02\MB5L\[MB5L.xlsx]MB5L'!$A$1:$H$19;2;FALSE));;VLOOKUP($A2;'K:\MD\_data\Fim do Mês\Data\2018\2018-02\MB5L\[MB5L.xlsx]MB5L'!$A$1:$H$19;2;FALSE))
Column F
Code:
=IF(ISERROR(VLOOKUP($A2;'K:\MD\_data\Fim do Mês\Data\2018\2018-03\MB5L\[MB5L.xlsx]MB5l'!$A$1:$H$19;2;FALSE));;VLOOKUP($A2;'K:\MD\_data\Fim do Mês\Data\2018\2018-03\MB5L\[MB5L.xlsx]MB5l'!$A$1:$H$19;2;FALSE))
And so forth. Each column looks for the file MB5L in a subfolder corresponding to the year and the filename has the year and month in format 20xx_xx
This year, we'll pull data from files using the same naming strategy, in a 2019 subfolder. What I am looking to do is replace the 2018's in the formulas with 2019's. Using the find and replace won't work as it asks me to point to the new file (which doesn't exist yet).
Is there any script I can use to replace all references in the range from 2018 to 2019 without the files actually existing?