Copying cells to another worksheet

Paulo H

Board Regular
Joined
Jun 10, 2020
Messages
106
Office Version
  1. 2016
Platform
  1. Windows
Hi I am copying cells to another workseet which works fine

However this only copies in consecutive columns

How do I get it to miss a column then copy to next

code line is

Dim rngToCopy As Range: Set rngToCopy = wsMain.Range("B2,B3,D17,B8,B17,B1,C1,B12,B13,B14,H1,H3")

eg B2 copies to Column A
B3 to Column B
I would then like D17 to copy to Column D
In the line above how do I put a space between B3 and D17?

Its got me stuck

Cheers
 

Some videos you may like

Excel Facts

What do {} around a formula in the formula bar mean?
{Formula} means the formula was entered using Ctrl+Shift+Enter signifying an old-style array formula.

Lian

New Member
Joined
Jan 26, 2021
Messages
33
Office Version
  1. 365
  2. 2019
  3. 2016
Platform
  1. Windows
how about union(rng, rng1,rng2)
 

Watch MrExcel Video

Forum statistics

Threads
1,127,847
Messages
5,627,239
Members
416,232
Latest member
Ash1432

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
Top