View Single Post
  #1   Report Post  
Posted to microsoft.public.excel.programming
Trever B Trever B is offline
external usenet poster
 
Posts: 21
Default Selecting the correct range

Hi,

Thanks in advance

In the following code it is supposed to select Colums A to AN and copy them
to another worksheet (SS A). The problem is it only does A to V. (Could
have something to do with blank rows/Columns?)

How do I change the Current region to include A to AN

Application.EnableEvents = False


Worksheets("SS A").Range("A:IV").ClearContents



'With Worksheets("Panel Details").Range("A1").CurrentRegion
.AutoFilter Field:=1, Criteria1:="A"
.SpecialCells(xlCellTypeVisible).Copy _
Worksheets("SS A").Cells(1, 1)
.AutoFilter
End With


Application.EnableEvents = True