Hi, I have been stalking this forum for quite some time now, but this is my first post. I am very new to VBA, didn't know its existence until 2 months ago, trying to do some simple project with it.
My question goes like this, suppose I have variable number of worksheets (3~100), and all of them has the same format, of 3 columns, but different number of rows. Excel's consolidate does the job nicely, to consolidate column B and column C of each sheets into a new sheet. Each sheet has such naming convention: something_2015-??, where the last two are digits. My question is, how can I make the VBA to recognise the number of sheets, and then use consolidate function on column B and column C of each worksheet, then output in a new worksheet, called: "Master"? Creating new worksheet is not a problem, just the consolidating part, actually.
It seems that most of the replies from the web are on copying and pasting into one summary sheet.
My question goes like this, suppose I have variable number of worksheets (3~100), and all of them has the same format, of 3 columns, but different number of rows. Excel's consolidate does the job nicely, to consolidate column B and column C of each sheets into a new sheet. Each sheet has such naming convention: something_2015-??, where the last two are digits. My question is, how can I make the VBA to recognise the number of sheets, and then use consolidate function on column B and column C of each worksheet, then output in a new worksheet, called: "Master"? Creating new worksheet is not a problem, just the consolidating part, actually.
It seems that most of the replies from the web are on copying and pasting into one summary sheet.
Last edited: