Home |
Search |
Today's Posts |
|
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Hi Dabith ,
Change: Rows("1:Lastrow") to: Rows("1:" & LastRow). Also, you are missing an End With and there is no need to select your range. Therefore, your code could read : With ActiveSheet LastRow = (.UsedRange.Rows.Count + .UsedRange.Cells(1).Row - 1) End With Rows("1:" & LastRow).Copy --- Regards, Norman "dabith " wrote in message ... Hey all another question how do I use the Lastrow variable in the Rows argument??? Dim Lastrow As Long With ActiveSheet Lastrow = .UsedRange.Rows.Count + .UsedRange.Cells(1).Row - 1 Rows("1:Lastrow").Select Selection.Copy Thanks --- Message posted from http://www.ExcelForum.com/ |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
How many rows (arguments?) can be seached by Vlookup function? | Excel Discussion (Misc queries) | |||
IF-more than 7 arguments in | Excel Worksheet Functions | |||
And, if, arguments.... | Excel Worksheet Functions | |||
Counting rows with two arguments | Excel Discussion (Misc queries) | |||
arguments | Excel Discussion (Misc queries) |