Macro to copy data to new workbooks based on condition

hosinsul 1 Posts Tuesday January 9, 2018Registration date January 9, 2018 Last seen - Jan 9, 2018 at 01:22 PM - Latest reply: ac3mark 8621 Posts Monday June 3, 2013Registration dateModeratorStatus January 15, 2018 Last seen
- Jan 9, 2018 at 04:57 PM
Hello,

I have a workbook with data that looks something like this (except thousands of entries):

Name     Type     Group    Master    
John Big a 1
Rick Small a 0
Jack Big b 0
Rob Medium b 1


I need a macro that will copy data to new workbooks and save them individually based on the value in column C (Group). The macro needs to select all rows that have the same group (same value in column B) and then copy/paste them into a new workbook and save it in the same folder as the base workbook. In the above example, it should copy the two rows that have the group "a" (value = a in column C), copy (or move completely) them to a new workbook and save it, then select the rows that have the group "b" (value = B in column C) and do the same. The main workbook has thousands of rows and hundreds of groups.

Edit: Edited for clarity.

Any help would be appreciated!

See more 

1 reply

Reply to this topic
ac3mark 8621 Posts Monday June 3, 2013Registration dateModeratorStatus January 15, 2018 Last seen - Jan 9, 2018 at 04:57 PM
+1
Helpful
Take a look here, and see if any of this can be applied to your model:
http://ccm.net/faq/53497-how-to-manipulate-data-in-excel-using-vba

Have fun!
Respond to ac3mark