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: 4
Default Convert Advanced filter macro to VBA

Hi

I have this macro to filter data


Sheets("Working Data").Select
Cells.Select
Selection.Delete Shift:=xlUp
Range("A1").Select
Sheets("Raw data").Cells.AdvancedFilter Action:=xlFilterCopy,
CriteriaRange _
:=Sheets("Filter Criteria").Rows("1:3"),
CopyToRange:=Range("A1"), Unique _
:=False
Cells.Select
Selection.Columns.AutoFit


The filter Criteria is on sheet Filter Criteria
There are row headings from Columns A to AG
The actual criteria are;

Cell D2 ="=*AoS"
Cell F3 ="=*AoS"

Cell I2 ="=*Battle"
Cell I3 ="=*Battle"

Cell L2 ="=USA"
Cell L3 ="=USA"

Cell M2 ="=*Victory"
Cell M3 ="=*Victory"

The data being filtered is on sheet Raw Data
Once the data is filtered, it is copied top sheet Working data

I have read in various threads that VBA code can be more efficient
than Macro code. My questions is..

how do you convert the above code to VBA?
 
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
Advanced Filter Macro Failing Mustang Excel Discussion (Misc queries) 3 June 18th 09 05:15 AM
Advanced Filter Macro Alex.W Excel Discussion (Misc queries) 1 April 4th 08 12:19 PM
Advanced Filter Macro Dolphinv4 Excel Discussion (Misc queries) 2 March 20th 08 11:42 AM
Using Advanced Filter through Macro Prashant Garg[_2_] Excel Programming 4 December 18th 04 01:28 AM
Advanced Filter Macro with InputBox use No Name Excel Programming 3 October 30th 04 12:10 AM


All times are GMT +1. The time now is 02:13 PM.

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

About Us

"It's about Microsoft Excel"