Copy Sheet to Workbook - Rename the Sheet tab
Posted on 2014-01-13
There are two workbooks that are downloaded daily from a third party application. The first workbook is named Error_Log_Report.xls, by that application. This workbook 1, contains the main part of the information needed. A macro has already been written that will reformat and rename Sheets 1-4 (only four are listed and/or visible).
The second workbook that is downloaded is also named Error_Log_Report.xls and has the same number of sheets with similar information. However, the only sheet of interest is Sheet1. What is the best way to:
1.Copy this Sheet1 to the first workbook as the last sheet in the workbook
2. Rename it to a day prior to "today" with the following format - "mm-dd PM"
3. Delete this second workbook, keeping only the workbook that now has five sheets within it
Sheet Tab Name example for the copied sheet into workbook 1:
If today is 01-14, then the sheet tab would be name 01-13 PM
As the downloading is manually done, the focus of the workbooks can be set, if that will help, as they both have the same name.