A more efficient way of doing this

P5X

New Member
Joined
Feb 16, 2002
Messages
18
OK, basically I am copying and pasting 3 cells from one sheet into another, I can't copy all the cells at once due to how they are arranged on the sheet, so I was wondering if there would be an easier way of doing this than copying the cell, selecting the sheet and then pasting the cell (3 times)

[C7].Copy
Sheets("Component_list").Select
[A40].End(xlUp).Offset(1, 0).PasteSpecial
Sheets("Add_components").Select
[C9].Copy
Sheets("Component_list").Select
[B40].End(xlUp).Offset(1, 0).PasteSpecial
Sheets("Add_components").Select
[C11].Copy
Sheets("Component_list").Select
[C40].End(xlUp).Offset(1, 0).PasteSpecial
Sheets("Add_components").Select
 

Excel Facts

What did Pito Salas invent?
Pito Salas, working for Lotus, popularized what would become to be pivot tables. It was released as Lotus Improv in 1989.
On 2002-02-17 10:26, P5X wrote:
OK, basically I am copying and pasting 3 cells from one sheet into another, I can't copy all the cells at once due to how they are arranged on the sheet, so I was wondering if there would be an easier way of doing this than copying the cell, selecting the sheet and then pasting the cell (3 times)

[C7].Copy
Sheets("Component_list").Select
[A40].End(xlUp).Offset(1, 0).PasteSpecial
Sheets("Add_components").Select
[C9].Copy
Sheets("Component_list").Select
[B40].End(xlUp).Offset(1, 0).PasteSpecial
Sheets("Add_components").Select
[C11].Copy
Sheets("Component_list").Select
[C40].End(xlUp).Offset(1, 0).PasteSpecial
Sheets("Add_components").Select
This will work for you (if I understand your requirements):

Range("C7,C9,C11").Copy
Range("A40").End(xlUp).Offset(1, 0).PasteSpecial _
Paste:=xlAll, Operation:=xlNone, SkipBlanks:=False _
, Transpose:=True
Application.CutCopyMode = False
 
Upvote 0

Forum statistics

Threads
1,214,518
Messages
6,119,985
Members
448,935
Latest member
ijat

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