Hi all,
Please can someone me with 2 problems I'm having with macros in Excel 97.
How can I input the items in the AutoFilter list into an a array so that I can manipulate the data grouped by the AutoFilter list. Basically, if I had a column with a few 1s, 5s, and 8s in it, then AutoFiltered that column, I'd get a choice of All, 1, 5, 8, Blanks, and Non Blanks in the AutoFilter list. I need a macro to be able to select "1" from the list then copy and paste the data in the column, then select "All" to reset the list and column. I then need to select "5" from the list then copy and paste the data in the column, then select "All" to reset the list and column. ... And so forth. If the column only had 1s, 5s, and 8s, etc (i.e. known figures) it would be easy but the data differs from spreadsheet to spreadsheet so I need the macro to be able to work out what numbers will be in the column and the AutoFilter them in a loop.
Secondly, I need to create new Sheets and name them, say, Day1, Day5, and Day8 (i.e. the word "Day" and the number from the AutoFilter list. I know how to create the new Sheet via macro but am having a problem naming the new Sheets as they sould be named.
I hope this all makes sense. Please can someone help?
Best regards,
Clinton Edwards
"The important thing is not to stop questioning." - Albert Einstein
Please can someone me with 2 problems I'm having with macros in Excel 97.
How can I input the items in the AutoFilter list into an a array so that I can manipulate the data grouped by the AutoFilter list. Basically, if I had a column with a few 1s, 5s, and 8s in it, then AutoFiltered that column, I'd get a choice of All, 1, 5, 8, Blanks, and Non Blanks in the AutoFilter list. I need a macro to be able to select "1" from the list then copy and paste the data in the column, then select "All" to reset the list and column. I then need to select "5" from the list then copy and paste the data in the column, then select "All" to reset the list and column. ... And so forth. If the column only had 1s, 5s, and 8s, etc (i.e. known figures) it would be easy but the data differs from spreadsheet to spreadsheet so I need the macro to be able to work out what numbers will be in the column and the AutoFilter them in a loop.
Secondly, I need to create new Sheets and name them, say, Day1, Day5, and Day8 (i.e. the word "Day" and the number from the AutoFilter list. I know how to create the new Sheet via macro but am having a problem naming the new Sheets as they sould be named.
I hope this all makes sense. Please can someone help?
Best regards,
Clinton Edwards
"The important thing is not to stop questioning." - Albert Einstein