LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 468
Default Macro-indirect cell

Hi, i have this code:

Sub copy1()
Dim lastRow As Long
lastRow = Worksheets("Sheet2").Cells(Worksheets("Sheet2").Ro ws.Count,
"A").End(xlUp).Row
Worksheets("Sheet1").UsedRange.Copy
Worksheets("Sheet2").Activate
Range("A" & (lastRow + 1)).Select
ActiveSheet.Paste
End Sub

Can this code be made to copy rows to a specific sheet?
In "M1" i will write october, so when i run macro, the code to copy rows to
"october" sheet. If i write november, then the code to copy rows to
"november" sheet.
Can this be done?
Thanks!
 
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Allow EXCEL INDIRECT(ADDRESS()) and INDIRECT(RANGE()) functions Mike Barlow Excel Worksheet Functions 7 May 21st 23 07:42 PM
2Q:Indirect worksheet selection in macro, Calc off for specific sh seed Excel Discussion (Misc queries) 1 December 30th 08 09:11 PM
Using INDIRECT in a macro/vba gcouch Excel Discussion (Misc queries) 0 February 26th 08 09:37 PM
Macro that sort on clnm populated by indirect [email protected] Excel Discussion (Misc queries) 2 March 2nd 07 03:45 PM
Using Indirect & Creating a worksheet Macro Bill Healy Excel Worksheet Functions 1 November 5th 04 10:51 AM


All times are GMT +1. The time now is 02:31 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"