Macro to copy data to new workbooks based on condition

Closed
hosinsul Posts 1 Registration date Tuesday January 9, 2018 Status Member Last seen January 9, 2018 - Updated on Jan 9, 2018 at 03:13 PM
 Blocked Profile - 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!

1 response

Blocked Profile
Jan 9, 2018 at 04:57 PM
Take a look here, and see if any of this can be applied to your model:
https://ccm.net/faq/53497-how-to-manipulate-data-in-excel-using-vba

Have fun!
1