#1   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 37
Default Select Data Range

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   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 2,420
Default Select Data Range

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   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 37
Default Select Data Range

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   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 22,906
Default Select Data Range

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   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 37
Default Select Data Range

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   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 22,906
Default Select Data Range

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
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
how to select and count from a range of data Ajay Excel Discussion (Misc queries) 2 December 10th 08 02:36 PM
select range containing data saman110 via OfficeKB.com Excel Discussion (Misc queries) 2 March 21st 08 12:36 AM
When entering data into a range of cells, select the entire range. Q Excel Discussion (Misc queries) 0 September 26th 07 04:36 AM
In data range select final value. skydiving3 Excel Discussion (Misc queries) 2 August 7th 07 07:16 PM
How do I select 13 months from a data range for charts marg Charts and Charting in Excel 3 March 14th 07 06:30 AM


All times are GMT +1. The time now is 11:47 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"