Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
How does this work?
Can anyone interpret this code for me to explain the logic in how it works.
I've run it and can see the results but I still don't understand the logic used that makes this small amount of code do so much! Sub x() Dim c As Long With Sheet1 .AutoFilterMode = False For c = 3 To .Cells(1, 1).End(xlToRight).Column .Range("A1").AutoFilter Field:=c, Criteria1:="X" Sheets.Add(after:=Sheets(Sheets.Count)).Name = Left(.Cells(1, c), 31) .AutoFilter.Range.Resize(, 2).Copy ActiveSheet.Range("A1") .ShowAllData Next c .AutoFilterMode = False End With End Sub Thanks, Brian |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Macro to update a column in a work based on another work sheet | New Users to Excel | |||
HOW TO MAKE A LIST OF WORK SHEET IN WORK BOOK IN EXCEL 2007 | Excel Programming | |||
If I have a work sheet protected and try to run a macro to hide rows or columns it won't work. Correct? | Excel Programming | |||
Counting dates in multiple work sheets and work books | Excel Discussion (Misc queries) | |||
Is there away to keep "auto save" from jumping to the first work sheet in the work book? | New Users to Excel |