Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 11
Default Macro - Varying Range to Copy

I need to write a macro to go out to another spreadsheet copy a set of rows,
and paste them into the original spreadsheet. The range to copy will always
start at the same cell, but may vary in length (i.e. a1:g12, and then the
next time a1:g50). Is there a way to do this? Any help would be greatly
appreciate.

Thank You in advance!

  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 812
Default Macro - Varying Range to Copy

iEnd = Sheets("Sheet1").Range("A1").End(xlDown).Row
Sheets("Sheet1").Range("A1:G" & iEnd).Copy

Hth,
Merjet


Reply
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
Using macro/vba to copy varying ranges of rows BCLivell Excel Discussion (Misc queries) 3 June 6th 07 02:52 PM
AutoFill down a varying Range Dean@ERYC Excel Programming 3 October 13th 06 03:56 PM
Subtotals in a range of varying size CEG Excel Programming 0 February 17th 06 05:51 PM
Range varying in for loop McManCSU Excel Programming 1 June 16th 05 06:24 PM
Using Varying Range Size in Macro Charles Allen[_2_] Excel Programming 1 May 16th 05 12:48 AM


All times are GMT +1. The time now is 10:55 AM.

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

About Us

"It's about Microsoft Excel"