Home |
Search |
Today's Posts |
|
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
What's the best way to set a Range variable to point to the
End(xlDown) cell? The following seems to do the job. But can this be improved? Dim rng as Range Set rng = Range(Range("C3").End(xlDown).Address) |
#2
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Set rng = Range("C3").End(xlDown)
// Per skrev i en meddelelse ... What's the best way to set a Range variable to point to the End(xlDown) cell? The following seems to do the job. But can this be improved? Dim rng as Range Set rng = Range(Range("C3").End(xlDown).Address) |
#3
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Hi
This is the same as Set rng = Range("C3").End(xlDown) If the data you are processing has gaps below C3 then you might use Set rng = Range("C65536").End(xlup) to identify the last cell with data below C3. The first method will stop above the first blank cell . regards Paul On Feb 7, 2:08*pm, wrote: What's the best way to set a Range variable to point to the End(xlDown) cell? The following seems to do the job. *But can this be improved? Dim rng as Range Set rng = Range(Range("C3").End(xlDown).Address) |
#4
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
On Thu, 7 Feb 2008 06:08:41 -0800 (PST), wrote:
What's the best way to set a Range variable to point to the End(xlDown) cell? The following seems to do the job. But can this be improved? Dim rng as Range Set rng = Range(Range("C3").End(xlDown).Address) Rather: Dim c As Range Set c = Range("c3").End(xlDown) Debug.Print c.Address --ron |
#5
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
On Feb 7, 6:18*am, Ron Rosenfeld wrote:
On Thu, 7 Feb 2008 06:08:41 -0800 (PST), wrote: The following seems to do the job. *But can this be improved? Dim rng as Range Set rng = Range(Range("C3").End(xlDown).Address) Rather: Dim c As Range Set c = Range("c3").End(xlDown) Thanks to all who pointed this out. Klunk! I misread the Help page, then I proceeded to confuse myself when I did `debug.print range("c3").end(xldown)`. |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Use xldown to select a range of cells | Excel Discussion (Misc queries) | |||
End(xldown) not always going to last cell? | Excel Programming | |||
Unable to use Range.End(xlDown) method | Excel Programming | |||
Unable to get last filled cell address from Range.End(xlDown) method | Excel Programming | |||
Select the next row after xldown range | Excel Programming |