Thread
:
Selecting range
View Single Post
#
5
Posted to microsoft.public.excel.programming
Don Guillett[_4_]
external usenet poster
Posts: 2,337
Selecting range
Not if NOT contiguous
--
Don Guillett
SalesAid Software
"Indu" wrote in message
...
Don and Nikos thank you very much for your help. Both
versions work just the way I wanted it to. Thanks again.
-----Original Message-----
See if this helps
Sub myarea()
x = Cells(Rows.Count, "c").End(xlUp).Row
Range(Cells(2, "d"), Cells(x, "d")).Select
End Sub
--
Don Guillett
SalesAid Software
"Indu Aronson"
wrote in message
...
I have an Excel 2000 spreadsheet where C1 and D1 have
headings. Column C has contiguous data but the number of
data rows changes. Sometimes it is 300, sometimes 322
and
at yet others 600. (That is, C1:C601 has data).
If C1:C601 have data, I would like to select D2:D601. In
other words, I would like the starting point to be D2
and
the end point to depend on how much data C contains.
If someone can show me how to do this it would be
greatly
appreciated. If someone could show me how to select data
based on the previous column (rather than limit it to C
and D)that would be even more helpful.
Thank you.
--Indu
.
Reply With Quote
Don Guillett[_4_]
View Public Profile
Find all posts by Don Guillett[_4_]