Using VBA to select entire rows 
Author Message
 Using VBA to select entire rows

I have a macro in which I want to copy entire rows from one sheet to
another. The reason I want to copy the entire row is to get the row heights.
The number of rows on the source sheet varies so I am using two variables
(firstRow = 2, lastRow=RANGE("G65536").END(xlup) ). For example if the last
row is 12,450 then ROWS("2:12450").COPY is what I want to do. But, I haven't
figured out how to do this using the variables.

I'm sure this is very basic but I just haven't done it before.

I'd appreciate any help.

--
Francis Hayes
Johnson Incorporated



Wed, 18 Jun 1902 08:00:00 GMT  
 Using VBA to select entire rows
Hello

is this what you need ?
Range(Rows(firstrow), Rows(lastrow)).Select

Bye
Steph

selection.copy
Corporate Systems (Johnson Inc.) a crit dans le message

Quote:
>I have a macro in which I want to copy entire rows from one sheet to
>another. The reason I want to copy the entire row is to get the row
heights.
>The number of rows on the source sheet varies so I am using two variables
>(firstRow = 2, lastRow=RANGE("G65536").END(xlup) ). For example if the last
>row is 12,450 then ROWS("2:12450").COPY is what I want to do. But, I
haven't
>figured out how to do this using the variables.

>I'm sure this is very basic but I just haven't done it before.

>I'd appreciate any help.

>--
>Francis Hayes
>Johnson Incorporated




Wed, 18 Jun 1902 08:00:00 GMT  
 Using VBA to select entire rows
Use the .EntireRow method.

Dave Braden


Quote:

> I have a macro in which I want to copy entire rows from one sheet to
> another. The reason I want to copy the entire row is to get the row heights.
> The number of rows on the source sheet varies so I am using two variables
> (firstRow = 2, lastRow=RANGE("G65536").END(xlup) ). For example if the last
> row is 12,450 then ROWS("2:12450").COPY is what I want to do. But, I haven't
> figured out how to do this using the variables.

> I'm sure this is very basic but I just haven't done it before.

> I'd appreciate any help.

> --
> Francis Hayes
> Johnson Incorporated




Wed, 18 Jun 1902 08:00:00 GMT  
 Using VBA to select entire rows
I think about it, butit wasn't necessary to solve the problem :-)
example :
selection.entirerow.copy

Bye
Steph


Quote:
>Use the .EntireRow method.

>Dave Braden


>> I have a macro in which I want to copy entire rows from one sheet to
>> another. The reason I want to copy the entire row is to get the row
heights.
>> The number of rows on the source sheet varies so I am using two variables
>> (firstRow = 2, lastRow=RANGE("G65536").END(xlup) ). For example if the
last
>> row is 12,450 then ROWS("2:12450").COPY is what I want to do. But, I
haven't
>> figured out how to do this using the variables.

>> I'm sure this is very basic but I just haven't done it before.

>> I'd appreciate any help.

>> --
>> Francis Hayes
>> Johnson Incorporated




Wed, 18 Jun 1902 08:00:00 GMT  
 
 [ 4 post ] 

 Relevant Pages 

1. Select an entire row w. VBA

2. Selecting an entire row, when one cell within the row has a certain value

3. Row select using VBA

4. help selecting a range of rows using VBA

5. Another question regarding selecting an entire row when a desired value is found in a cell

6. A script to select an entire row when a desired value is found in a cell

7. Select Entire Column to last row

8. Macro//selecting entire row

9. Selecting Entire Row of Active Cell

10. selecting range ...entire row less one cell


 
Powered by phpBB® Forum Software © phpBB Group