samedi 18 avril 2015

Excel VBA - AdvancedFilter

Afternoon, I am trying to filter a range dyanmically in VBA and the VBA i am using is not wokring but i cannot see a logical reason as to why. To explain, i have a range of data in a sheet entitled "Full Stock Report" the size of which will change but i've set it statically in this example... And im trying to filter it by a list of criteria held in a range on a sheet entitied "Spitfire Aval Locations", again this is also dynamic but i've set as static again in this example. This sounds simple to me but the below line of code applies a filter but with no results (i have checked i know there are lots that should appear from this filter).


My second question is related, how does this VBA statement dictate which column in the range is being filtered ? (I fear this may be my issue ....)


Sheets("Full Stock Report").Range("A1:F20623").AdvancedFilter Action:=xlFilterInPlace, CriteriaRange:=Sheets("Spitfire Aval Locations").range("A2:A228"), Unique:=False


Aucun commentaire:

Enregistrer un commentaire