Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 273
Default using variables to select multiple rows using a macro

I am trying to use 2 different variables and either the ROWS or RANGE command
in a macro to select a continuous block of rows. I want to copy this block
from one sheet to another sheet. I have been trying to use the following
syntax with no avail: ROWS(firstrownumber,lastrownumber).Select I also
tried using:
RANGE(firstrownumber:firstrownumber,lastrownumber: lastrownumber).Select I
have to use a variable, because the actual row numbers I will be copying and
pasting will change every time I run the macro. I can make it work if I only
select and copy one row at a time, but in one of my sheets I need to select
and copy 2880 rows of data, and doing that one at a time takes about 5
minutes. Any suggestions would be very much appreciated. Thanks.
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
Select multiple rows not next to each other LarryJNX Excel Worksheet Functions 3 April 4th 23 02:20 PM
Select multiple rows and add a value in a column AJM1949 Excel Programming 2 June 7th 05 11:16 PM
Select all data, multiple rows George Wilson Excel Discussion (Misc queries) 6 December 5th 04 08:16 PM
Count rows based on multiple variables Murph Excel Programming 3 October 27th 04 11:35 AM
how to select multiple rows using vba almostthere Excel Programming 6 June 4th 04 07:48 PM


All times are GMT +1. The time now is 11:31 PM.

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"