vba to select report type, loop through a list of clients, filter and copy table to new workbook

Melimob

Active Member
Joined
Oct 16, 2011
Messages
395
Office Version
  1. 365
Hi can anyone suggest the best starting point for what I want to achieve.

I have 3 different raw data tables on separate tabs
1) Client
2) Advisor Employed
3) Advisor Self Employed

For each of these I have 2 different unique lists containing
1) Clients
2) advisors employed/self employed

If user chooses Run Client report and selects month/year, it should look through the unique client list and for each client, filter the raw data table and save it as a new excel workbook, attach it to an email and put their commission plus some verbiage on mail. (Commission amount would be on a seperate sheet)
Want to save to a new shared onedrive folder by Introducer Reports > Client Name, include Month on file. Even better if we just set up one workbook and for each month it get's appended but no issue if separate.

Likewise, if user chooses run 'Advisor Self Employed' it will look to the advisor list + employed + month, year and do the same.

At the moment, I'm thinking easier to create 3 separate vba scripts to keep it simple and for error handling.

Grateful for any vba coding already similar to this approach.

Many thanks
Melissa
 

Excel Facts

Fastest way to copy a worksheet?
Hold down the Ctrl key while dragging tab for Sheet1 to the right. Excel will make a copy of the worksheet.

Forum statistics

Threads
1,215,241
Messages
6,123,823
Members
449,127
Latest member
Cyko

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