Secret Chimpanzee
Board Regular
- Joined
- Jun 21, 2012
- Messages
- 141
Hi,
I have two worksbooks - one with data (wb1) for the previous day and the other, a template (wb2) that the data needs to be copied into.
The data are results based on different groups in the business and their locations, and is sent everyday (and needs to be copied into wb2 each day). Wb2 also has these groups and locations listed but the group names are abbreviated.
I need a macro to search wb1 to do the following:
1. Look for the first group called "Melbourne" (this heading is usually in column 1)
2. Look for yesterday's date (column changes daily as the data is updated, but is always the last column with data in it)
3. Select and copy the 8 cells beneath the column with yesterday's date (the 9th row is the beginning of the next group and row of dates, then 8 rows of data under it)
4. Then go to wb2 and select the corresponding group called "MEL" as well as the matching date (yesterday's)
5. Paste the data (from wb1) into the cells below
Hopefully there is enough information here...
Thanks in advance.
I have two worksbooks - one with data (wb1) for the previous day and the other, a template (wb2) that the data needs to be copied into.
The data are results based on different groups in the business and their locations, and is sent everyday (and needs to be copied into wb2 each day). Wb2 also has these groups and locations listed but the group names are abbreviated.
I need a macro to search wb1 to do the following:
1. Look for the first group called "Melbourne" (this heading is usually in column 1)
2. Look for yesterday's date (column changes daily as the data is updated, but is always the last column with data in it)
3. Select and copy the 8 cells beneath the column with yesterday's date (the 9th row is the beginning of the next group and row of dates, then 8 rows of data under it)
4. Then go to wb2 and select the corresponding group called "MEL" as well as the matching date (yesterday's)
5. Paste the data (from wb1) into the cells below
Hopefully there is enough information here...
Thanks in advance.