VBA - copy data to new workbook based on criteria

Tangled1

New Member
Joined
Dec 10, 2021
Messages
12
Office Version
  1. 365
Platform
  1. Windows
I have had a search online but haven't been able to find something specific to what I need.

The main Wb "Dataset" stores the raw data sample (around 5k lines). Each of them belongs to teams and I only have use for 12 of them I.e. "Team 1" & "Team 2" etc. The sheet includes 7 colours, all of which I want to copy.

I want to copy this data to a new Wb only if they belong to each of the 12 teams. The save file path will be a specific folder in the drive. Ideally, I'd love to have each of the teams split out into separate sheets in the new Wb (I could rename them after), but I think I may thinking of something way to complex? Otherwise, I just want to copy team 1-12 data to this new Wb. (Excel 365)

Is there a possible code for this? I'm still learning VBA
 

Excel Facts

Spell Check in Excel
Press F7 to start spell check in Excel. Be careful, by default, Excel does not check Capitalized Werds (whoops)

Forum statistics

Threads
1,223,956
Messages
6,175,612
Members
452,661
Latest member
Nonhle

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