taylorjfab
New Member
- Joined
- May 1, 2013
- Messages
- 1
Hi Guys,
I am currently trying to write a macro to cop and paste severall sets of data from one workbook to another. There are two parts to my problem:
1) The workbook name will be pasted into a cell which the macro will refference (the refference workbook will already be open so we do not need to include this command)
Is there a way to link a macro to a cell where name is typed in?
2) when copy and pasting the data I am looking for a quick bit of code; i.e. there are 20 different scenarios will varying inputs which need to be copied across (values only - so paste special function) to said active workbook at same cell positsions when macro is run
e.g. The cells in scenario 1 that need to be copied across are: D189:D191, G190:H191, M187, D194:D213, D215, H194:H213
The The cells in scenario 2 that need to be copied across are: D220:D222, G221:H222, M218, D225:D244, D246, H225:H244
etc.....
for each scenario the cell difference is +31, up to 20 scenarios
Does anyone have an equation that can be used to automate this without recording a long and slow macro
Many Thanks,
Jonny
I am currently trying to write a macro to cop and paste severall sets of data from one workbook to another. There are two parts to my problem:
1) The workbook name will be pasted into a cell which the macro will refference (the refference workbook will already be open so we do not need to include this command)
Is there a way to link a macro to a cell where name is typed in?
2) when copy and pasting the data I am looking for a quick bit of code; i.e. there are 20 different scenarios will varying inputs which need to be copied across (values only - so paste special function) to said active workbook at same cell positsions when macro is run
e.g. The cells in scenario 1 that need to be copied across are: D189:D191, G190:H191, M187, D194:D213, D215, H194:H213
The The cells in scenario 2 that need to be copied across are: D220:D222, G221:H222, M218, D225:D244, D246, H225:H244
etc.....
for each scenario the cell difference is +31, up to 20 scenarios
Does anyone have an equation that can be used to automate this without recording a long and slow macro
Many Thanks,
Jonny