Home |
Search |
Today's Posts |
#2
![]()
Posted to microsoft.public.excel.worksheet.functions
|
|||
|
|||
![]()
When you do Data|Filter|Autofilter (in xl2003 and below), you get 2 criteria.
You can't cheat excel and try to use an array in code. I'd insert a new column (K???) and use a formula like: =or(j2={"Days", "From", "Hrs", "Off", "On", "To"}) Then drag down. Then you could filter to show Trues. tweacle wrote: have a macro that I keep getting a error on. Can anyone help. The macro shown below. Sub Macro2() ' ' Macro2 Macro ' ' Columns("J:J").Select Selection.AutoFilter ActiveSheet.Range("$J$1:$J$330").AutoFilter Field:=1, Criteria1:=Array( _ "Days", "From", "Hrs", "Off", "On", "To"), Operator:=xlFilterValues Selection.SpecialCells(xlCellTypeVisible).Select Selection.ClearContents Range("J1").Select End Sub Ive put into my workbook and comes up with run time error 1004 auto method of range class failed. Can anyone help. Im using office XP if that helps. Thanks -- tweacle -- Dave Peterson |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Macro Help Needed - Excel 2007 - Print Macro with Auto Sort | Excel Worksheet Functions | |||
My excel macro recorder no longer shows up when recording macro | Excel Discussion (Misc queries) | |||
using a cell value to control a counter inside a macro and displaying macro value | Excel Worksheet Functions | |||
Macro needed to Paste Values and prevent Macro operation | Excel Discussion (Misc queries) | |||
Macro needed to Paste Values and prevent Macro operation | Excel Discussion (Misc queries) |