t0ny84
Board Regular
- Joined
- Jul 6, 2020
- Messages
- 205
- Office Version
- 365
- 2016
- 2013
- Platform
- Windows
- Mobile
- Web
Hi All,
I was wondering if this is a) possible b) someone had some example code.
I have 2 workbooks (Workbook A and Workbook B)
Workbook A - This is the main workbook which holds all required data.
Workbook B - This is a workbook which is downloaded from Microsoft Forms and has a variable name which is made up of Work Survey and a number which is based on responses entered. e.g. Work Survey (1-8).xls
What I am trying to do is when I open Workbook A and download and open Workbook B I can run a macro in Workbook A which would do either:
1) Would locate the open workbook with Work Survey in the name and then copy the worksheet from this workbook over to Workbook A. Then have another macro which I could use to automate sorting oldest to newest, deleting duplicates keeping only the newest rows based on date\time entry.
2) Workbook B - Sort oldest to newest based on date\time in column X
- Delete duplicate rows based keeping the newest based on the date in column X.
- Input Box to allow user to enter new name for spreadsheet.
- Copy the now edited sheet to the end of Workbook A
Thanks in advance,
t0ny84
I was wondering if this is a) possible b) someone had some example code.
I have 2 workbooks (Workbook A and Workbook B)
Workbook A - This is the main workbook which holds all required data.
Workbook B - This is a workbook which is downloaded from Microsoft Forms and has a variable name which is made up of Work Survey and a number which is based on responses entered. e.g. Work Survey (1-8).xls
What I am trying to do is when I open Workbook A and download and open Workbook B I can run a macro in Workbook A which would do either:
1) Would locate the open workbook with Work Survey in the name and then copy the worksheet from this workbook over to Workbook A. Then have another macro which I could use to automate sorting oldest to newest, deleting duplicates keeping only the newest rows based on date\time entry.
2) Workbook B - Sort oldest to newest based on date\time in column X
- Delete duplicate rows based keeping the newest based on the date in column X.
- Input Box to allow user to enter new name for spreadsheet.
- Copy the now edited sheet to the end of Workbook A
Thanks in advance,
t0ny84