Hello everyone,
I am relatively new to Macro, so rather from writing it, I use Macro recording.
Below are my copied code:
Selection.AutoFilter
Columns("L:O").AdvancedFilter Action:=xlFilterCopy, CriteriaRange:=Range("U1:U2"),
CopyToRange:=Range("V1"), Unique:=False
Columns("W:W").Select
Selection.AutoFilter
Range("W1:W99436").AdvancedFilter Action:=xlFilterCopy, CopyToRange:=Range( _
"AA1"), Unique:=True
After pressing the hot key, the first Autofilter works. It is based on L M N O columns and gereate 4 new columns, V W X Y.
2nd filter will based on column w and generate into a new column, AA.
However, at AA column, it only generates header (the column title) but no data. When I do it manually, there are header as well as filtered data.
Does anyone catch any mistake in the code? I tried many times but it only generate the header of Column w.
If you can offer me a hand, that would be perfect.
Thanks so much,
Mucc
Bookmarks