Home |
Search |
Today's Posts |
|
#1
![]()
Posted to microsoft.public.excel.misc
|
|||
|
|||
![]()
Wise forum, I have a range of data I want to select to perform some rutinary
tasks. I want to select only the data and not the whole sheet. I tried using this: Range("A2", "I" & Rows.Count).End(xlDown).Select but it doesn't work. Can anybody tell me what is wrong? Thank you. |
#2
![]()
Posted to microsoft.public.excel.misc
|
|||
|
|||
![]()
Assuming Excel 2003, Rows.Count will hold 65536, which means that
Range("A2", "I" & Rows.Count) will pick a full range, so End(xlDown) is just not necessary. -- __________________________________ HTH Bob "alexrs2k" wrote in message ... Wise forum, I have a range of data I want to select to perform some rutinary tasks. I want to select only the data and not the whole sheet. I tried using this: Range("A2", "I" & Rows.Count).End(xlDown).Select but it doesn't work. Can anybody tell me what is wrong? Thank you. |
#3
![]()
Posted to microsoft.public.excel.misc
|
|||
|
|||
![]()
That's the problem with that, I don't want all the rows just the ones that
have Data. How can I select only the data and leave the rest unselected? "Bob Phillips" wrote: Assuming Excel 2003, Rows.Count will hold 65536, which means that Range("A2", "I" & Rows.Count) will pick a full range, so End(xlDown) is just not necessary. -- __________________________________ HTH Bob "alexrs2k" wrote in message ... Wise forum, I have a range of data I want to select to perform some rutinary tasks. I want to select only the data and not the whole sheet. I tried using this: Range("A2", "I" & Rows.Count).End(xlDown).Select but it doesn't work. Can anybody tell me what is wrong? Thank you. |
#4
![]()
Posted to microsoft.public.excel.misc
|
|||
|
|||
![]()
Sub test()
Dim Lrow As Long With ActiveSheet Lrow = .Range("A" & Rows.Count).End(xlUp).Row .Range("A2:I" & Lrow).Select End With End Sub Note: you don't generally have to select something to operate on it. Gord Dibben MS Excel MVP On Tue, 4 Aug 2009 08:06:01 -0700, alexrs2k wrote: Wise forum, I have a range of data I want to select to perform some rutinary tasks. I want to select only the data and not the whole sheet. I tried using this: Range("A2", "I" & Rows.Count).End(xlDown).Select but it doesn't work. Can anybody tell me what is wrong? Thank you. |
#5
![]()
Posted to microsoft.public.excel.misc
|
|||
|
|||
![]()
Gord, you are the man. It worked out like "tube" as a friend of mine used to
say. THANK YOU!!! -- Alex *Remember to click "yes" if this post helped you. Thank you! "Gord Dibben" wrote: Sub test() Dim Lrow As Long With ActiveSheet Lrow = .Range("A" & Rows.Count).End(xlUp).Row .Range("A2:I" & Lrow).Select End With End Sub Note: you don't generally have to select something to operate on it. Gord Dibben MS Excel MVP On Tue, 4 Aug 2009 08:06:01 -0700, alexrs2k wrote: Wise forum, I have a range of data I want to select to perform some rutinary tasks. I want to select only the data and not the whole sheet. I tried using this: Range("A2", "I" & Rows.Count).End(xlDown).Select but it doesn't work. Can anybody tell me what is wrong? Thank you. |
#6
![]()
Posted to microsoft.public.excel.misc
|
|||
|
|||
![]()
Thanks for the feedback.
Gord On Tue, 4 Aug 2009 09:02:01 -0700, alexrs2k wrote: Gord, you are the man. It worked out like "tube" as a friend of mine used to say. THANK YOU!!! |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
how to select and count from a range of data | Excel Discussion (Misc queries) | |||
select range containing data | Excel Discussion (Misc queries) | |||
When entering data into a range of cells, select the entire range. | Excel Discussion (Misc queries) | |||
In data range select final value. | Excel Discussion (Misc queries) | |||
How do I select 13 months from a data range for charts | Charts and Charting in Excel |