View Single Post
  #3   Report Post  
Posted to microsoft.public.excel.programming
Colo[_30_] Colo[_30_] is offline
external usenet poster
 
Posts: 1
Default macros, filters, HELP

Hi CaveMan,

The code would be something like this..
You can use "AutoFilter" method and to copy filtered range, can use
"AutoFilter.Range" as follows.


Code:
--------------------

Sub Macro1()
With Sheets("database")
.AutoFilterMode = False 'Just in case
.Range("A1").CurrentRegion.AutoFilter _
Field:=1, _
Criteria1:="something"
With .AutoFilter.Range
'Remove Title row
'If you want to add the Title, just use .Copy _ instead
.Resize(.Rows.Count - 1).Offset(1).Copy _
Sheets("search").Range("A4")
End With
.AutoFilterMode = False
End With
End Sub

--------------------



---
Message posted from http://www.ExcelForum.com/