Home |
Search |
Today's Posts |
|
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
I have the following code to set a range to the bottom of the sheet:
Set rng7 = Range(xcell.Offset(71, -2), xcell.Offset(65000, -2)).EntireRow I know there is a way to set it to the very bottom of the sheet, but I can't find it. How do I do this? Thanks |
#2
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Hi
This will take set rng7 = last row with data, if all rows have data in the "xcell" column. LastRow = xcell.End(xlDown).Row ' I assume xCell is a range Set rng7 = Rows(LastRow) Regards, Per On 8 Sep., 20:19, ranswrt wrote: I have the following code to set a range to the bottom of the sheet: Set rng7 = Range(xcell.Offset(71, -2), xcell.Offset(65000, -2)).EntireRow I know there is a way to set it to the very bottom of the sheet, but I can't find it. *How do I do this? Thanks |
#3
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Sub dural()
Set r = Range("A" & Rows.Count).EntireRow r.Select End Sub will select the last row of a worksheet (both 2007 and prior versions) -- Gary''s Student - gsnu200803 "ranswrt" wrote: I have the following code to set a range to the bottom of the sheet: Set rng7 = Range(xcell.Offset(71, -2), xcell.Offset(65000, -2)).EntireRow I know there is a way to set it to the very bottom of the sheet, but I can't find it. How do I do this? Thanks |
#4
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Try this formula...
Set rng7 = Rows(Rows.Count) -- Rick (MVP - Excel) "ranswrt" wrote in message ... I have the following code to set a range to the bottom of the sheet: Set rng7 = Range(xcell.Offset(71, -2), xcell.Offset(65000, -2)).EntireRow I know there is a way to set it to the very bottom of the sheet, but I can't find it. How do I do this? Thanks |
#5
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Set rng7 = Range(xcell.Offset(71, -2), cells(rows.count, "A")).EntireRow
-- HTH... Jim Thomlinson "ranswrt" wrote: I have the following code to set a range to the bottom of the sheet: Set rng7 = Range(xcell.Offset(71, -2), xcell.Offset(65000, -2)).EntireRow I know there is a way to set it to the very bottom of the sheet, but I can't find it. How do I do this? Thanks |
#6
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Thank You
"Jim Thomlinson" wrote: Set rng7 = Range(xcell.Offset(71, -2), cells(rows.count, "A")).EntireRow -- HTH... Jim Thomlinson "ranswrt" wrote: I have the following code to set a range to the bottom of the sheet: Set rng7 = Range(xcell.Offset(71, -2), xcell.Offset(65000, -2)).EntireRow I know there is a way to set it to the very bottom of the sheet, but I can't find it. How do I do this? Thanks |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
how can i see the headings at the bottom of the sheet | New Users to Excel | |||
VBA to find the bottom of a sheet | Excel Programming | |||
VBA to find the bottom of a sheet | Excel Programming | |||
bottom sheet tab disappears | Excel Worksheet Functions | |||
Calculate at the bottom of the sheet? | Excel Discussion (Misc queries) |