Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]() 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 |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Selecting range in list of range names depending on a cell informa | Excel Discussion (Misc queries) | |||
Help please in selecting range dependent on another range | Excel Programming | |||
Selecting a Range | Excel Programming | |||
Selecting a Range | Excel Programming | |||
Selecting a Range inside a range | Excel Programming |