Thread
:
Weird range property behaviour
View Single Post
#
3
Posted to microsoft.public.excel.programming
Don Guillett[_4_]
external usenet poster
Posts: 2,337
Weird range property behaviour
try
x = Range("rr").Cells(1, 1)to get the data in the top left
to select rows
With Range("rr")
.Range(Cells(1, 1), Cells(5, 1)).EntireRow.Select
End With
OR
With Range("rr")
..Rows("1:5").EntireRow.Select
End With
--
Don Guillett
SalesAid Software
"Gareth Thackeray" wrote in message
...
Hi everybody,
I hope someone can shed some light on this very strange Excel 2000
behaviour.
I have a range object, r, and I would expect:
r.Range(r.Cells(1,1), r.Cells(5,1)).EntireRow to return a range whose
top-left cell was the top-left cell of r.
But instead, it returns a range whose top-left cell is the leftmost cell
of
the 4th row down of r.
And in fact, r.Range(r.Cells(-2,1), r.Cells(5,1)).EntireRow returns a
range
with the top-left cell that is the top-left cell of r.
Is the problem for this too obscure to see or too obvious to see?
Thanks for any help,
Gareth
Reply With Quote
Don Guillett[_4_]
View Public Profile
Find all posts by Don Guillett[_4_]