LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default Selecting Used Range


I have the following code I am trying to edit:

Public Sub SelectData()

Workbooks(CurName).Activate
Range("A1").Activate

ActiveSheet.UsedRange.Select
rowscount = Selection.Rows.Count

Set CopyArea = Range("A1", ("L" & rowscount))

CopyArea.Select
Get_Col_Widths

End Sub

There are some hidden columns to the right of L that contain data. Th
data goes all the way to row 149. In Excel if I look for the last ro
it goes to 149, so does this code. For instance A:L might only have 4
rows. I want to just select those 45 rows and not the rows with hidde
data in them. Otherwise I get additional pages with no data in them
Can this be done? I there a way in the Slection.Rows.Count to limit i
to look in just columns A-L

--
lori
-----------------------------------------------------------------------
loric's Profile: http://www.excelforum.com/member.php...fo&userid=3392
View this thread: http://www.excelforum.com/showthread.php?threadid=53698

 
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
Selecting range in list of range names depending on a cell informa Courreges Excel Discussion (Misc queries) 2 June 19th 06 10:59 AM
Help please in selecting range dependent on another range MickJJ Excel Programming 2 January 10th 05 12:01 PM
Selecting a Range KulbirSingh[_3_] Excel Programming 0 October 27th 04 02:45 PM
Selecting a Range KulbirSingh[_2_] Excel Programming 1 October 27th 04 02:18 PM
Selecting a Range inside a range hcova Excel Programming 0 July 13th 04 03:26 PM


All times are GMT +1. The time now is 03:46 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"