Let’s say you have sales data for your company and you need to send each of the sales representatives in the company a copy of their sales. You might not want to share the entire set of data with each rep but just their own sales due to privacy concerns around their commission based compensation. To do this, you will need to take our original set of data and parse it out into many different workbooks (one for each sales rep) based on the sales rep column in the data. Parsing and exporting data into different workbooks is a very common problem. Unfortunately, Excel does not have a built-in solution. We would need to manually filter for each item in a column and then copy and paste the filtered data into a new file and save that. This can be very time-consuming if we have a lot of values to filter or if this is an activity we will be doing monthly, weekly, or even daily. Fortunately, we can automate this with VBA! This template will allow you to separate out your data by selecting a column to separate it based on. This workbook uses a table called Data to hold the aggregate data. You can adjust the size and column heading to suit your data. Delete or add columns as desired and rename the column headings to suit your own data. The drop-down menu will automatically account for the new column headings. Set your save path accordingly, this is where the VBA will save all the new data files it creates. When the template is all set up, press the Run button and your new data files will appear in the save path folder. The VBA uses named range references so the template is flexible and you can cut and paste the sheet until you’re satisfied and you will not break the code. Here is the VBA code used in the template. Note: This was tested on Excel 2016 but I have not tested it on previous versions.

How To Export Your Data Into Separate Workbooks Based On The Values In A Column - 56