Copy paste using offset and resize based on a range variable

jhonty4

Board Regular
Joined
May 16, 2016
Messages
85
Hi All, This post will help me understand the use of offset and resize hopefully. I have a range ("C8:C31") containing names and designations of employees.For first emp the name is in the range "C8" & and designation in Range"C10" and it goes on till C31 for other employees.This means that one employee has 3 rows the first row is his name and the last one is the designation. I want to copy designation of every emp and paste it into all three rows for that one employee in column D. If it is not possible with resize and offset other options will be appreciated
TIA
 

Excel Facts

Copy PDF to Excel
Select data in PDF. Paste to Microsoft Word. Copy from Word and paste to Excel.
How about
Code:
Sub tst()
Dim i
   For i = 8 To 29 Step 3
      Range("D" & i).Resize(3).Value = Range("C" & i).Offset(2)
   Next i
End Sub
 
Upvote 0
Glad to help & thanks for the feedback
 
Upvote 0

Forum statistics

Threads
1,224,818
Messages
6,181,152
Members
453,021
Latest member
Justyna P

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