I have a spreadsheet where I have pulled from our accounting system the balance sheets for each company and named the sheets with each company's code. For example CO1, CO2, CO3. There are 18 companies so 18 sheets.
On each of the company sheets are the balance sheet data which is in columns A - S. Row 1 is the column headings and row 2 onwards is the data. The number of rows varies by company.
I would like to create a VBA where it takes the data in columns A - S from row 2 onwards for each company and pastes it onto a 'Master' sheet from row 2 down (because row 1 has the headings already populated in the Master sheet). In the Master sheet however I need to identify which company the data relates to therefore would like to for Column A to have the name of the sheet where the data was copied from, then in columns B - T the data from the sheets which was in columns A - S from row 2 down. I note that the number of rows varies on each sheet and I would like it to pull only all the data from row 2 down to the end based on column A. What I mean by this is that column A on each sheet has the account codes but the number of account codes in each company varies therefore I would like it to pick up all account codes until there is no more in column A.
For reference the workbook is set up with sheets as following:
1) Control sheet - there are other steps that occur to ensure we have all the company data in the same format. This is the first sheet and has instructions on it and macro buttons for other purposes
2) Master sheet called 'BS Summary'
3 onwards = all company sheets (18 of them)
On each of the company sheets are the balance sheet data which is in columns A - S. Row 1 is the column headings and row 2 onwards is the data. The number of rows varies by company.
I would like to create a VBA where it takes the data in columns A - S from row 2 onwards for each company and pastes it onto a 'Master' sheet from row 2 down (because row 1 has the headings already populated in the Master sheet). In the Master sheet however I need to identify which company the data relates to therefore would like to for Column A to have the name of the sheet where the data was copied from, then in columns B - T the data from the sheets which was in columns A - S from row 2 down. I note that the number of rows varies on each sheet and I would like it to pull only all the data from row 2 down to the end based on column A. What I mean by this is that column A on each sheet has the account codes but the number of account codes in each company varies therefore I would like it to pick up all account codes until there is no more in column A.
For reference the workbook is set up with sheets as following:
1) Control sheet - there are other steps that occur to ensure we have all the company data in the same format. This is the first sheet and has instructions on it and macro buttons for other purposes
2) Master sheet called 'BS Summary'
3 onwards = all company sheets (18 of them)