Hi everyone,
I have seen similar questions (http://www.mrexcel.com/forum/showthread.php?t=329973&highlight=copy+data+based+cell) and tried to convert code to my needs, but I haven't been able to get anything to work.
Here is my situation. I have 3 workbooks.
WB 1 - Input.xls - Is where I put my cell references to run some macros
WB 2 - Sales.xls - A list of sales by region
WB 3 - Output.xls - basically where I am formatting the results of the macros, but for this example, we can consider it completely blank.
I am trying to add a macro that will look at the Input workbook and take the value in cell C5 which is the region pictured below
and based on that value copy the shaded rows in the workbook Sales.xls in which the region matches.
and then paste that data into my output file.
It is late where I am so won't be able to check until tomorrow, but be assured I am very
thankful of any help offered. Thanks everyone -
I have seen similar questions (http://www.mrexcel.com/forum/showthread.php?t=329973&highlight=copy+data+based+cell) and tried to convert code to my needs, but I haven't been able to get anything to work.
Here is my situation. I have 3 workbooks.
WB 1 - Input.xls - Is where I put my cell references to run some macros
WB 2 - Sales.xls - A list of sales by region
WB 3 - Output.xls - basically where I am formatting the results of the macros, but for this example, we can consider it completely blank.
I am trying to add a macro that will look at the Input workbook and take the value in cell C5 which is the region pictured below
Input.xls | ||||||
---|---|---|---|---|---|---|
A | B | C | D | |||
1 | Attainment#'s | FilePath | C:\ | |||
2 | GoalSheet | Sales | ||||
3 | Region | Southeast | ||||
4 | CurrentMonth | 5 | ||||
5 | FileName | Sales.xls | ||||
6 | ||||||
7 | Accounts | FilePath | C:\ | |||
8 | FileName | Accounts.xls | ||||
9 | ||||||
10 | ||||||
Sheet1 |
and based on that value copy the shaded rows in the workbook Sales.xls in which the region matches.
Sales.xls | ||||||||||
---|---|---|---|---|---|---|---|---|---|---|
A | B | C | D | E | F | G | H | |||
1 | InvDate | Inv# | HospitalName | Hosp# | Contract# | akkl | Region | |||
2 | 1138 | 5/12/2008 | A | MW | ||||||
3 | 1138 | 5/12/2008 | B | MW | ||||||
4 | 1138 | 5/15/2008 | C | MW | ||||||
5 | 1138 | 5/21/2008 | D | MW | ||||||
6 | 1138 | 5/22/2008 | E | MW | ||||||
7 | 1138 | 5/29/2008 | F | MW | ||||||
8 | 1138 | 5/29/2008 | G | MW | ||||||
9 | 1138 | 5/29/2008 | H | MW | ||||||
10 | 1139 | 5/21/2008 | A | E | ||||||
11 | 1140 | 5/22/2008 | B | E | ||||||
12 | 1141 | 5/29/2008 | C | E | ||||||
13 | 1142 | 5/30/2008 | A | E | ||||||
14 | 1143 | 5/31/2008 | B | E | ||||||
Sheet1 |
and then paste that data into my output file.
It is late where I am so won't be able to check until tomorrow, but be assured I am very
thankful of any help offered. Thanks everyone -