Excel VBA - Paste Data to Specific Tab Name

becca_832313

New Member
Joined
Mar 29, 2020
Messages
1
Office Version
  1. 365
Hello, I have a workbook containing two data sets, one on Worksheet1 and one in Worksheet2. Within each data set, Column A contains a standard mapping (this mapping is dynamic and is based on the rows of data). I have an existing macro that filters on Column A in Worksheet1 and create a new worksheet for every unique value in Column A - each of these worksheets names match the filtered criteria. I would now like to Filter Column A in Worksheet2, based on the same mapping criteria, and past the values to the bottom of the newly created tabs . How do i specify the tab name to paste the data into based off of what is currently filtered?
 

Excel Facts

Can Excel fill bagel flavors?
You can teach Excel a new custom list. Type the list in cells, File, Options, Advanced, Edit Custom Lists, Import, OK
Hello Becca,

Are you saying that you wish to create more worksheets from the unique values in Column A of Worksheet2?

or

Are you saying that you wish to copy/paste the relevant data from Worksheet2 to the new worksheets created from Column A of Worksheet1?

Uploading a sample of your workbook will help tremendously in helping you sort this out.

Cheerio,
vcoolio.
 
Upvote 0
Don't know if I understand it right, but maybe
VBA Code:
For i = 2 To Cells(Rows.Count, 1).End(xlUp).Row
    With Sheets(Cells(i, 1).Value))
        .Cells(.Rows.Count, 1).End(xlUp).Offset(1).Resize(, 7).Value = Cells(i, 1).Resize(,7).Value
    End With
Next i
Like vcoolio suggested, if you could upload a workbook with a before and after in it to a site like "dropbox", that would be a great help.
 
Upvote 0

Forum statistics

Threads
1,214,653
Messages
6,120,752
Members
448,989
Latest member
mariah3

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