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

Bring active cell back into view
Start at A1 and select to A9999 while writing a formula, you can't see A1 anymore. Press Ctrl+Backspace to bring active cell into view.

Forum statistics

Threads
1,215,045
Messages
6,122,836
Members
449,096
Latest member
Erald

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