Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations biv343 on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Excel copy / paste help needed 1

Status
Not open for further replies.

Henryk

MIS
May 14, 2004
12
GB
Hi all,

no amount of analysing recorded macros has helped me to figure out how to do what I need, so please can someone help?

I have sheet names in row 2. Let's say my active cell is row 5 column 7. I want to copy cells a5:e5 from the sheet name stored in column 7 row 2 to sheet display row 1 column 1.

I actually need to do a lot more but an answer to this will point me in the right direction..

Thanks,
H
 



Hi,

"I have sheet names in row 2. Let's say my active cell is row 5 column 7. I want to copy cells a5:e5 from the sheet name stored in column 7 row 2 to sheet display row 1 column 1. "

Code:
ActiveSheet.Range(Cells(ActiveCell.row, "A"), Cells(ActiveCell.row, "E")).Copy Sheets(Cells(2, ActiveCell.Column).value).Cells(1,1)




Skip,

[glasses] [red][/red]
[tongue]
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top