I am trying to create dynamic columns on a report tab, based on pre-defined filter sorts. The issue is I cannot figure out how to automatically change the headings and number of columns.
See example.
Thank you in advance.
I am trying to create dynamic columns on a report tab, based on pre-defined filter sorts. The issue is I cannot figure out how to automatically change the headings and number of columns.
See example.
Thank you in advance.
You could try adding these lines to your "Blond" macro:
For macros "Age" and "State" you just modify which columns to delete and which should be "Autofit".ActiveSheet.AutoFilter.Range.Copy Sheets("Report").Activate Range("B2").PasteSpecial Paste:=xlPasteValues Application.CutCopyMode = False Columns("D:G").Delete Columns("B:C").AutoFit
If you don't wish to add the headings to your report use
AlfActiveSheet.AutoFilter.Range.Offset(1).Copy
Thank you Alf. I am trying the code.
There are currently 1 users browsing this thread. (0 members and 1 guests)
Bookmarks