ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Copying Data OR Selecting Columns In Pieces (https://www.excelbanter.com/excel-programming/432652-copying-data-selecting-columns-pieces.html)

Faraz A. Qureshi

Copying Data OR Selecting Columns In Pieces
 
Sure would oblige if any of u experts would kindly offer me with a sample
code so as to clarify the concept of activating/selecting specific number of
columns within a range.

For instance, a code which would select the columns within a specified range
in two, as follows:

1. With range already selected (e.g. $A:$H);
2. First select columns $A:$B; Then
3. First select columns $C:$D; Then
4. First select columns $E:$F; Then
5. First select columns $G:$H; Then

The end!

--
Best Regards,

Faraz

Faraz A. Qureshi

Copying Data OR Selecting Columns In Pieces
 
A sort of OFFSET?
--
Best Regards,

Faraz


"Faraz A. Qureshi" wrote:

Sure would oblige if any of u experts would kindly offer me with a sample
code so as to clarify the concept of activating/selecting specific number of
columns within a range.

For instance, a code which would select the columns within a specified range
in two, as follows:

1. With range already selected (e.g. $A:$H);
2. First select columns $A:$B; Then
3. First select columns $C:$D; Then
4. First select columns $E:$F; Then
5. First select columns $G:$H; Then

The end!

--
Best Regards,

Faraz


Jacob Skaria

Copying Data OR Selecting Columns In Pieces
 
Do you mean the below.. Try running this code using F8 (Step into) and see
what happens on each line OR try line by line from immediate window...

Range("A:H").select
selection.resize(,2).select
selection.resize(,4).select
selection.resize(,6).select
selection.resize(,8).select

If this post helps click Yes
---------------
Jacob Skaria


"Faraz A. Qureshi" wrote:

A sort of OFFSET?
--
Best Regards,

Faraz


"Faraz A. Qureshi" wrote:

Sure would oblige if any of u experts would kindly offer me with a sample
code so as to clarify the concept of activating/selecting specific number of
columns within a range.

For instance, a code which would select the columns within a specified range
in two, as follows:

1. With range already selected (e.g. $A:$H);
2. First select columns $A:$B; Then
3. First select columns $C:$D; Then
4. First select columns $E:$F; Then
5. First select columns $G:$H; Then

The end!

--
Best Regards,

Faraz



All times are GMT +1. The time now is 08:36 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
ExcelBanter.com