I have a program that generates an excel file under the name "cutlist.xlsx" consistently, that I require 2 sheets from named "SheetComponentListing" and "SheetStockSummary". I am generating these "cutlist.xlsx" files on a per job basis, and each job has its own folder with a file called "cutlist.xlsx"
Basically, I have created a spreadsheet that is intended to be printed for our shop floor, to display what is in this cutlist.xlsx file in a way that is readable, and also add additional information.
Currently, I have all my formulas linked to sheet names "PH1" and "PH2" which are just being used as placeholders to avoid a #REF error when the sheet doesn't exist. I am manually copying the "SheetComponentListing" and "SheetStockSummary" from the "cutlist.xlsx" workbook to the new one, and then doing a find and replace so PH1 = "SheetComponentListing" and PH2 = "SheetStockSummary".
All this works well, however I am needing to pass this off to other people in my workplace who will not be able to complete that task manually.
How would I go about creating a macro that would do this:
Basically, I have created a spreadsheet that is intended to be printed for our shop floor, to display what is in this cutlist.xlsx file in a way that is readable, and also add additional information.
Currently, I have all my formulas linked to sheet names "PH1" and "PH2" which are just being used as placeholders to avoid a #REF error when the sheet doesn't exist. I am manually copying the "SheetComponentListing" and "SheetStockSummary" from the "cutlist.xlsx" workbook to the new one, and then doing a find and replace so PH1 = "SheetComponentListing" and PH2 = "SheetStockSummary".
All this works well, however I am needing to pass this off to other people in my workplace who will not be able to complete that task manually.
How would I go about creating a macro that would do this:
- Search the directory of the current opened workbook and open "cutlist.xlsx"
- Copy "SheetComponentListing" and "SheetStockSummary" from the "cutlist.xlsx" workbook and paste in the original workbook
- Find and replace so PH1 = "SheetComponentListing" on sheet titled "Data" and Find and Replace so PH2 = "SheetStockSummary" on sheet titled "Main"