Need Code for copying/pasting irregular data from one workbook to another

Minerva7

New Member
Joined
Mar 24, 2019
Messages
16
DISCIPLINE 1
25-Mar
26-Mar
27-Mar
Team 1
205
197
195
Team 2
10
23
15
Team 3
267
290
293
Team 4
56
57
55
Team 5
2
0
4

<tbody>
</tbody>

Need code that will allow me to copy/paste daily total (extracted data) for each team into another Excel workbook with a table similar to the one above. I have 11 sheets, one per discipline, that contain anywhere from one up to fifteen teams each (all with different bug totals per day). This data can only be extracted by discipline, and comes out looking like this:

DISCIPLINE 1
25-Mar
Team 1
205
Team 2
10
Team 3
267
Team 4
56
Team 5
2

<tbody>
</tbody>

I have to do this 11 times, so it’s already tedious enough. Then, each discipline has up to multiple teams; so it’s a ton of copying pasting. Note: there are days when Team 5 of Discipline 1 has zero bugs, so the extracted data looks like this where Team 5 is omitted:

DISCIPLINE 1
26-Mar
Team 1
197
Team 2
23
Team 3
290
Team 4
57

<tbody>
</tbody>

Is there a way for me to paste values for only those teams that are included in the extracted data? Moreover, can Excel do a search by team name, then look for the next blank cell in the row for that team and paste (i.e. Team 1, 28-Mar, since 27-Mar has data)? I’m a serious VBA beginner, but I’m hoping someone can give me a jump start on this to save me some time while I learn VBA. This report is taking too much time to do, and it seems VBA is the only way to accomplish this? Whatever the case, I currently don't know how to get it done except manually.

I hope this makes sense. Thanks in advance for any amount of help you can offer.
 

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
To make the macro I have to see how your data is in book 1 (source) and in book 2 (destination)
So I need you to upload 2 files with examples, the data in book 1 should be in book 2 highlighted in yellow.

You could upload a copy of your file to a free site such as www.box.com or www.dropbox.com. Once you do that, mark it for 'Sharing' and you will be given a link to the file that you can post here. If the workbook contains confidential information, you could replace it with generic data.
 
Upvote 0
I do not understand your book (origin). You only put one team, you must put at least 2 teams.
In the book (origin) you have "Team 2 - South Africa" ​​with 24, but in the book (destination), there is not that 24.
Nor does the date (origin) exist in the book, so where will I put the 24?

Upload another 2 books with clear examples.
 
Upvote 0

Forum statistics

Threads
1,214,551
Messages
6,120,156
Members
448,948
Latest member
spamiki

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