Copy/Paste loop until blank

naximov

New Member
Joined
Feb 2, 2015
Messages
1
I am trying to copy data from sheet 1 (which is manually updated by users) to sheet 2 (which acts as a database).
The data I need to copy consists of processes and users. Processes are listed in one column on sheet 1 (no breaks), users are listed in one row, both the number of users/names and processes will change. The loop needs to stop copying when there is a blank cell after the last user. Sheet 1 looks like this:

User1 User2 User3 etc blank
Process a
Process b
Process c
etc



I need to write a loop code, which would copy complete list of processes, and then add user name next to it (ie if there are 4 users, list of processes would be copied 4 times below each other, a set per user). E.g.

  • Column 1 Column 2
  • Process a User 1
  • Process b User 1
  • Process a User 2
  • Process b User 2
  • Process a User 3
  • Process b User 3
I am new to Excel, could you please advise how I can do this is in VBA?
 

Excel Facts

What is the shortcut key for Format Selection?
Ctrl+1 (the number one) will open the Format dialog for whatever is selected.

Forum statistics

Threads
1,214,791
Messages
6,121,611
Members
449,038
Latest member
apwr

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