Macro to copy sheets in new workbook based on company name

samuraikata

New Member
Joined
Nov 12, 2015
Messages
2
Hello,

I have a workbook with several sheets: AP, AR, GL, Expenses which all contain information about KPIs for different companies.

Column A in each of the above sheets is a concatenation between columns B & C (used as a unique key for vlookup in other sheets which generate graphs).

Column B contains a list of company names.

Column C contains different categories for KPIs
Columns D to AS contain month-year - the idea is that people need to input numbers for each category for each company.

What I need is a macro which selects all rows (regardless of whether they are empty or not) for each company from each of the AP, AR, GL, Expenses sheets and copy them into a separate workbook which will contain data only for 1 company. So, the result should be - a new workbook with sheets AP, AR, GL, Expenses for company ABR only and all these sheets contain rows with data about only company ABR.

Can anybody help with the code please?

Thank you.
 

Excel Facts

How to total the visible cells?
From the first blank cell below a filtered data set, press Alt+=. Instead of SUM, you will get SUBTOTAL(9,)

Forum statistics

Threads
1,220,965
Messages
6,157,120
Members
451,399
Latest member
alchavar

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top