saschmeling
New Member
- Joined
- Jun 27, 2012
- Messages
- 39
Ok- so have another tough one.
I have two workbooks, one is called Projections, one is report. Using VBA, I want to compare column A in Report with Column A in Projection. If they are the same then I want Column C from Projection to fill in Column G in Report. These are two different workbooks and must remain so.
Here is as far as I can get.
Dim RRange as Range
Dim PRange as Range
Dim FRange as Range
Dim ORange as Range
Set RRange = Workbook- worksheet Report A:A
Set PRange = Workbook- Worksheet Project A:A
Set FRange = Workbook - Worksheet Project C:C
Set ORange = Workbook - Worksheet Report G:G
"I know that is not proper coding for the Set- is not what I wrote. What I am trying to do is keep it fairly generic as I will have to use this multiple times for multiple code sets.
So- the Question is- How do I write.
If a cell in PRange = RRange then output Frange into ORange.
The data set size is variable based on other code variables.
Any and all help would be great.
Thanks,
Scott
I have two workbooks, one is called Projections, one is report. Using VBA, I want to compare column A in Report with Column A in Projection. If they are the same then I want Column C from Projection to fill in Column G in Report. These are two different workbooks and must remain so.
Here is as far as I can get.
Dim RRange as Range
Dim PRange as Range
Dim FRange as Range
Dim ORange as Range
Set RRange = Workbook- worksheet Report A:A
Set PRange = Workbook- Worksheet Project A:A
Set FRange = Workbook - Worksheet Project C:C
Set ORange = Workbook - Worksheet Report G:G
"I know that is not proper coding for the Set- is not what I wrote. What I am trying to do is keep it fairly generic as I will have to use this multiple times for multiple code sets.
So- the Question is- How do I write.
If a cell in PRange = RRange then output Frange into ORange.
The data set size is variable based on other code variables.
Any and all help would be great.
Thanks,
Scott