Copy from base roster to personal roster (VBA)

Phil Smith

Active Member
Joined
Aug 13, 2004
Messages
285
Office Version
  1. 365
Platform
  1. Mobile
Hi Excel people.

I have a worksheet, "Base Roster", which contains my work base roster in numerical order from Week 1 in row 2 down to Week 80 in row 81.

I have a regular swap with a colleague, so have another worksheet ("My Roster") where one week I work my own line of work, the next week I work my colleagues line of work and vice versa. He works all the early shifts and i work all the lates.

At the moment my code loops through the base roster so C3:AD3 is then named as "Week1", through to C81:AD81 named as "Week80". The code then loops through each line of "My Roster", extracts the week numbers B2:B81 then copies and pastes the apporpriate range "Week1" etc, to each line.

What I would like to happen is that when each line of the base roster is filled and named, that week number is then searched for in "My Roster", which could appear more than once, and then the relevant week pasted to that relevant row.

Thanks in advance.
 

Excel Facts

Return population for a City
If you have a list of cities in A2:A100, use Data, Geography. Then =A2.Population and copy down.
What I would like to happen is that when each line of the base roster is filled and named
You could put generic examples of what you have on each sheet before it is filled and named.
And then the result you want after filling and naming.
 
Upvote 0

Forum statistics

Threads
1,214,942
Messages
6,122,367
Members
449,080
Latest member
Armadillos

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