Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
"Advanced Filter runtime error"
Hi all. I'm writing a programme to sort out rankings for players in sport, and I'm looking to filter and copy a list so that I can separate players who are too old from those who are still eligible. I have a workbook with 12 worksheets in it, and 4 different subs behind it (quite large). Each sub is virtually identical as they all perform exactly the same task, but in a different quarter of the year. The first two subs work perfectly, but when I come to the 3rd quarter of the year, I suddenly get; run-time error '1004' the extract range has a missing or illegal field name Even though the section of code is exactly the same as the previous two quarters! The code is as follows; ' Filter those players still eligible into one table Range("A12").Select Range("A10:V100").AdvancedFilter _ Action:=xlFilterCopy, CriteriaRange:=Range("AA6:AV7"), CopyToRange:=Range("AA11") ' Filter those players too old into a second table Range("A12").Select Range("A10:V100").AdvancedFilter _ Action:=xlFilterCopy, CriteriaRange:=Range("BA6:BV7"), CopyToRange:=Range("BA11") Any help that can be provided to solve this would be much appreciated. Yours aye MW -- Martin Woods ------------------------------------------------------------------------ Martin Woods's Profile: http://www.excelforum.com/member.php...o&userid=31315 View this thread: http://www.excelforum.com/showthread...hreadid=510012 |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
"Advanced Filter runtime error"
If it is identical, then copy the headers/field names from a working sheet
and paste them over the headers on the problematic sheet. If Excel doesn't like what you have, you are not going to convince it otherwise even it if "looks good" to you. -- Regards, Tom Ogilvy "Martin Woods" wrote in message news:Martin.Woods.22wvtz_1139403603.8065@excelforu m-nospam.com... Hi all. I'm writing a programme to sort out rankings for players in sport, and I'm looking to filter and copy a list so that I can separate players who are too old from those who are still eligible. I have a workbook with 12 worksheets in it, and 4 different subs behind it (quite large). Each sub is virtually identical as they all perform exactly the same task, but in a different quarter of the year. The first two subs work perfectly, but when I come to the 3rd quarter of the year, I suddenly get; run-time error '1004' the extract range has a missing or illegal field name Even though the section of code is exactly the same as the previous two quarters! The code is as follows; ' Filter those players still eligible into one table Range("A12").Select Range("A10:V100").AdvancedFilter _ Action:=xlFilterCopy, CriteriaRange:=Range("AA6:AV7"), CopyToRange:=Range("AA11") ' Filter those players too old into a second table Range("A12").Select Range("A10:V100").AdvancedFilter _ Action:=xlFilterCopy, CriteriaRange:=Range("BA6:BV7"), CopyToRange:=Range("BA11") Any help that can be provided to solve this would be much appreciated. Yours aye MW -- Martin Woods ------------------------------------------------------------------------ Martin Woods's Profile: http://www.excelforum.com/member.php...o&userid=31315 View this thread: http://www.excelforum.com/showthread...hreadid=510012 |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
"Live" Advanced Filter (for unique records) | Excel Discussion (Misc queries) | |||
Advanced filter formula for "contains="Sept" | Excel Worksheet Functions | |||
Set OutApp = CreateObject("Outlook.Application") - Runtime error 429 | Excel Programming | |||
Help: runtime error "method seriescollection object_chart failed" | Excel Programming | |||
Excel will not "show all" from an Advanced Filter on a sheet with protected cells. | Excel Programming |