Hi, Long time reader, first time poster...
I have a table with with a list of values that represent serial numbers. Im looking for some VBA code that will check a specific directory to see if someone has added a file where the filename contains one of the serial numbers and updates the value in an adjacent cell (from "No" to the filename for example).
These files are being created and save to a directory over time so from time to time I would need to open this workbook and update. Could possible assign a macro to a button to run a check.
Im thinking something that uses a loop to run down the list and check each serial number and return a response the cell offset by 1 column.
[TABLE="class: grid, width: 1000"]
<tbody>[TR]
[TD]Col A[/TD]
[TD]Col B[/TD]
[TD][/TD]
[/TR]
[TR]
[TD]Serial Number[/TD]
[TD]File exists in DIR[/TD]
[TD]comment[/TD]
[/TR]
[TR]
[TD]185029[/TD]
[TD]OPT_185029_20190622.xlsx
[/TD]
[TD]filename could be something like: OPT_185029_20190622.xlsx or 185029-DW.xlsx[/TD]
[/TR]
[TR]
[TD]185030[/TD]
[TD]No[/TD]
[TD][/TD]
[/TR]
[TR]
[TD]185031[/TD]
[TD]No[/TD]
[TD][/TD]
[/TR]
[TR]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
</tbody>[/TABLE]
Hopefully someone has some ideas
Thanks
I have a table with with a list of values that represent serial numbers. Im looking for some VBA code that will check a specific directory to see if someone has added a file where the filename contains one of the serial numbers and updates the value in an adjacent cell (from "No" to the filename for example).
These files are being created and save to a directory over time so from time to time I would need to open this workbook and update. Could possible assign a macro to a button to run a check.
Im thinking something that uses a loop to run down the list and check each serial number and return a response the cell offset by 1 column.
[TABLE="class: grid, width: 1000"]
<tbody>[TR]
[TD]Col A[/TD]
[TD]Col B[/TD]
[TD][/TD]
[/TR]
[TR]
[TD]Serial Number[/TD]
[TD]File exists in DIR[/TD]
[TD]comment[/TD]
[/TR]
[TR]
[TD]185029[/TD]
[TD]OPT_185029_20190622.xlsx
[/TD]
[TD]filename could be something like: OPT_185029_20190622.xlsx or 185029-DW.xlsx[/TD]
[/TR]
[TR]
[TD]185030[/TD]
[TD]No[/TD]
[TD][/TD]
[/TR]
[TR]
[TD]185031[/TD]
[TD]No[/TD]
[TD][/TD]
[/TR]
[TR]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
</tbody>[/TABLE]
Hopefully someone has some ideas
Thanks