Quantcast
Channel: Microsoft Community - Super Fresh
Viewing all articles
Browse latest Browse all 1237235

Copying multiple sheets, but not all, into one sheet

$
0
0

Greetings,

I'm a complete VBA newbie (as in I find scripts online that works, and copy/paste without knowing what each line actually does), but I've been unable to find a script that does what I want on this occasion.

What I have:

  • A workbook with multiple sheets (shown in the screenshot below)
  • The "January" through "December" sheets all have same headers.
  • The amount of rows on each sheet from "January" through "December" varies, but the columns remain the same.

What I want:

  • Copy all data that are in the sheets ranging from "January" to "December" (inclusive), and have it all show on one long list in the "YTD"-sheet.
  • The header should only appear once (on row "1").
  • Ability to filter and sort in the same way in the "YTD"-sheet as in other sheets.
  • Column "A", starting from row "2" and down, should contain the name of the sheet that the data on that row is copied from.
  • Need to be able to sort and filter by column "A".
  • Automatically update the "YTD"-sheet whenever the workbook is opened.
  • Optional: Cell "A1" should say "Month:"
  • Optional: Rows with no data should be ignored even if they have a formatting (such as cell-colour and/or borders).

I've tried a script that I found here: http://www.rondebruin.nl/win/s3/win002.htm

I've also attempted to modify the script where I thought appropriate, but the closest I am getting to my wanted result is that it only copies from the "January" and "December" sheets, and copying the header from both.

Any help would be appreciated!


Viewing all articles
Browse latest Browse all 1237235

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>