ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   HOW TO SELECT SPECIFIED RANGE IN MACRO (https://www.excelbanter.com/excel-programming/409632-how-select-specified-range-macro.html)

K[_2_]

HOW TO SELECT SPECIFIED RANGE IN MACRO
 
how can I select a specified range in macro. For example if I have
data in sheet (see below)

ROW A B C F G H---col
1 XX XX XX XX XX XX----data
2 XX XX XX XX XX XX
3 XX XX XX XX XX
4 XX XX XX XX XX
5 XX XX XX XX XX XX
6 XX XX XX XX XX

I want to select range (A1: last value cell in col A & col C) and then
(F1 : col F cell of same row of last value cell in col A & col H)

basically i have data in row 1 from col B to C and then in F to H and
i want to copy the row 1 data down in columns B to C and F to H till
that row in which col A have last value cell

Mark Ivey[_2_]

HOW TO SELECT SPECIFIED RANGE IN MACRO
 
I think it would be better to copy one column at a time to avoid other
possible issues...

You can actually set up the Macro Recorder to do most of these functions for
you.

Start the Macro Recorder, select the top cell in the column you want, then
use a CNTL + SHIFT + DOWN ARROW to capture the entire column.
Then select CNTL + C to copy the data. Select the destination cell's top
position and select CNTL + V to paste.

Repeat for each column...

See if this will work for you...

Mark Ivey


"K" wrote in message
...
how can I select a specified range in macro. For example if I have
data in sheet (see below)

ROW A B C F G H---col
1 XX XX XX XX XX XX----data
2 XX XX XX XX XX XX
3 XX XX XX XX XX
4 XX XX XX XX XX
5 XX XX XX XX XX XX
6 XX XX XX XX XX

I want to select range (A1: last value cell in col A & col C) and then
(F1 : col F cell of same row of last value cell in col A & col H)

basically i have data in row 1 from col B to C and then in F to H and
i want to copy the row 1 data down in columns B to C and F to H till
that row in which col A have last value cell



K[_2_]

HOW TO SELECT SPECIFIED RANGE IN MACRO
 
On 19 Apr, 03:46, "Mark Ivey" wrote:
I think it would be better to copy one column at a time to avoid other
possible issues...

You can actually set up the Macro Recorder to do most of these functions for
you.

Start the Macro Recorder, select the top cell in the column you want, then
use a CNTL + SHIFT + DOWN ARROW to capture the entire column.
Then select CNTL + C to copy the data. Select the destination cell's top
position and select CNTL + V to paste.

Repeat for each column...

See if this will work for you...

Mark Ivey

"K" wrote in message

...



how can I select a specified range in macro. For example if I have
data in sheet (see below)


ROW * * A * * *B * * * *C * * F * * G * * * H---col
* 1 * * * *XX * * XX * * XX * * XX * * XX * * XX----data
* 2 * * * *XX * * XX * * XX * * XX * * XX * * XX
* 3 * * * *XX * * XX * * XX * * * * * * *XX * * XX
* 4 * * * *XX * * XX * * XX * * XX * * * * * * *XX
* 5 * * * *XX * * XX * * XX * * XX * * XX * * XX
* 6 * * * *XX * * XX * * XX * * XX * * XX


I want to select range (A1: last value cell in col A & col C) and then
(F1 : col F cell of same row of last value cell in col A & col H)


basically i have data in row 1 from col B to C and then in F to H and
i want to copy the row 1 data down in columns B to C and F to H till
that row in which col A have last value cell- Hide quoted text -


- Show quoted text -


thanks again mark. i think thats good idea

Mark Ivey[_2_]

HOW TO SELECT SPECIFIED RANGE IN MACRO
 
Glad to help out....

Mark Ivey

"K" wrote in message
...
On 19 Apr, 03:46, "Mark Ivey" wrote:
I think it would be better to copy one column at a time to avoid other
possible issues...

You can actually set up the Macro Recorder to do most of these functions
for
you.

Start the Macro Recorder, select the top cell in the column you want,
then
use a CNTL + SHIFT + DOWN ARROW to capture the entire column.
Then select CNTL + C to copy the data. Select the destination cell's top
position and select CNTL + V to paste.

Repeat for each column...

See if this will work for you...

Mark Ivey

"K" wrote in message

...



how can I select a specified range in macro. For example if I have
data in sheet (see below)


ROW A B C F G H---col
1 XX XX XX XX XX XX----data
2 XX XX XX XX XX XX
3 XX XX XX XX XX
4 XX XX XX XX XX
5 XX XX XX XX XX XX
6 XX XX XX XX XX


I want to select range (A1: last value cell in col A & col C) and then
(F1 : col F cell of same row of last value cell in col A & col H)


basically i have data in row 1 from col B to C and then in F to H and
i want to copy the row 1 data down in columns B to C and F to H till
that row in which col A have last value cell- Hide quoted text -


- Show quoted text -


thanks again mark. i think thats good idea



K[_2_]

HOW TO SELECT SPECIFIED RANGE IN MACRO
 
On 19 Apr, 13:15, "Mark Ivey" wrote:
Glad to help out....

Mark Ivey

"K" wrote in message

...



On 19 Apr, 03:46, "Mark Ivey" wrote:
I think it would be better to copy one column at a time to avoid other
possible issues...


You can actually set up the Macro Recorder to do most of these functions
for
you.


Start the Macro Recorder, select the top cell in the column you want,
then
use a CNTL + SHIFT + DOWN ARROW to capture the entire column.
Then select CNTL + C to copy the data. Select the destination cell's top
position and select CNTL + V to paste.


Repeat for each column...


See if this will work for you...


Mark Ivey


"K" wrote in message


....


how can I select a specified range in macro. For example if I have
data in sheet (see below)


ROW A B C F G H---col
1 XX XX XX XX XX XX----data
2 XX XX XX XX XX XX
3 XX XX XX XX XX
4 XX XX XX XX XX
5 XX XX XX XX XX XX
6 XX XX XX XX XX


I want to select range (A1: last value cell in col A & col C) and then
(F1 : col F cell of same row of last value cell in col A & col H)


basically i have data in row 1 from col B to C and then in F to H and
i want to copy the row 1 data down in columns B to C and F to H till
that row in which col A have last value cell- Hide quoted text -


- Show quoted text -


thanks again mark. *i think thats good idea- Hide quoted text -


- Show quoted text -


Hi Mark, i know you helped me quite lot. please see the link below for
the post and may be you can help me as you can understand my question
better. Many thanks.
http://groups.google.co.uk/group/mic...3cc79f6?hl=en#


All times are GMT +1. The time now is 09:10 AM.

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