Thanks. Seems strange that you cant do it in VBA when you can manuallly do it.
Also it seems you can do it for a whole array but not if I use fewer. eg this works for another one of my spreadsheets (code I got from recording the macro) ActiveSheet.Range("$A$1:$K$1450").AutoFilter Field:=4, Criteria1:=Array( _ "Bank of America Mar 12 future", "China 25 Index (£)", "ETF Emerging Markets", _ "EUR/GBP Jun 11 future", "EUR/GBP Mar 11 future", "EUR/GBP Sep 11 future", _ "FTSE 100 Dec 08 future", "FTSE 100 Mar 09 future (P=46<Dec)", _ "GBP/EUR Dec 09 future", "GBP/EUR Jun 10 future (P=2>Mar)", _ "GBP/EUR Mar 09 future (P=2>Dec)", "GBP/EUR Mar 10 future (P=2>Dec)", _ "GBP/EUR Sep 10 future (P=4>Jun)", "GBP/USD Dec 10 future", _ "GBP/USD Sep 10 future", "losses", "MSCI Brazil", "total", _ "Wall street Dec 08 future", "Wall street Jun 09 future (P=52> Sep)", _ "Wall street Jun 10 future (P=60< Mar)", "Wall street Jun 12 future (P=80< Mar)" _ , "Wall street Jun11 future (P=62< Mar)", "Wall street Mar 10 future (P=56< Dec)" _ , "Wall street Mar 10 future (P=62< Dec)", _ "Wall street Mar 11 future (P=62< Dec)", "Wall street Mar 12 future (P=80< Dec)" _ , "Wall street Sep 10 future (P=63< Jun)"), Operator:=xlFilterValues On Friday, April 12, 2013 8:46:40 AM UTC+1, colmkav wrote: > > Hi, > > how do I exclude items using VBA code? I thought I would get the code > using record macro but it only gave code to include items. > > eg > Range("A13").Select > ActiveSheet.Range("$A$13:$T$763").AutoFilter Field:=1, > Criteria1:=Array( _ > "10125014", "11394750", "2234200120", "2234600120", "52039100", > "52080100", _ > "54004912", "54004916"), Operator:=xlFilterValues > > I would like to exclude 3 items > > Colm > -- Are you =EXP(E:RT) or =NOT(EXP(E:RT)) in Excel? And do you wanna be? It’s =TIME(2,DO:IT,N:OW) ! Join official Facebook page of this forum @ https://www.facebook.com/discussexcel FORUM RULES 1) Use concise, accurate thread titles. Poor thread titles, like Please Help, Urgent, Need Help, Formula Problem, Code Problem, and Need Advice will not get quick attention or may not be answered. 2) Don't post a question in the thread of another member. 3) Don't post questions regarding breaking or bypassing any security measure. 4) Acknowledge the responses you receive, good or bad. 5) Jobs posting is not allowed. 6) Sharing copyrighted material and their links is not allowed. NOTE : Don't ever post confidential data in a workbook. Forum owners and members are not responsible for any loss. --- You received this message because you are subscribed to the Google Groups "MS EXCEL AND VBA MACROS" group. To unsubscribe from this group and stop receiving emails from it, send an email to excel-macros+unsubscr...@googlegroups.com. To post to this group, send email to excel-macros@googlegroups.com. Visit this group at http://groups.google.com/group/excel-macros?hl=en. For more options, visit https://groups.google.com/groups/opt_out.