ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Selective Copying with skipping rows in between Macro help please (https://www.excelbanter.com/excel-programming/423314-selective-copying-skipping-rows-between-macro-help-please.html)

binar[_2_]

Selective Copying with skipping rows in between Macro help please
 
Fellow Forum Members,
I would appreciate it a lot if someone can help me develop a macro that will
let me selectively copy cells and allow me to control the quantity of rows I
need skipped between each copied cell.

Currently I press the CONTROL button and manually select 50 cells in "Column
A" and manually skip 3 rows between each cell I select to copy. The result is
50 cells selected with three rows in between each selected cell.

This is tedious work and I need a macro that would ask me three questions
before I run it:

Question One: What is the first cell you want to copy?

My answer is : "A1"

Question Two: Total number of cells you want to copy following Cell "A1"?

My answer is : X (Could be 25, 30, 40 could be any number)

Question Three: How many rows do you want to skip between each of the copied
cells starting with cell "A1" ?

My answer is : X (could be 3, 4, 5, 6, 7, could be any number)

IS such a macro possible? I need to set this up because I am spending too
much time doing this custom type of copying over and over again. I need to
tell Excel how many rows to skip between each copied cell. If any one can
help me out in developing such a Macro I would be very grateful.

Thanks

OssieMac

Selective Copying with skipping rows in between Macro help please
 
Hi binar,

re Question Two: Total number of cells you want to copy following Cell "A1"?

This total number of cells would it always go to the bottom of the column?
if so, not necessary to enter the number; the system can count them.

Where are you pasting the copied cells? This needs to be done in the code
because there are a maximum number of cells that can be copied using VBA the
way you are doing it. (Run into problems with string lengths). The copy/paste
needs to be done with each cell in the code.

Selection of the first cell to copy and the number of cells to skip can be
done with the inputbox and the user actually selecting the first cell then
the first cells to skip. Could also include selecting the first cell of the
destination.


--
Regards,

OssieMac


"binar" wrote:

Fellow Forum Members,
I would appreciate it a lot if someone can help me develop a macro that will
let me selectively copy cells and allow me to control the quantity of rows I
need skipped between each copied cell.

Currently I press the CONTROL button and manually select 50 cells in "Column
A" and manually skip 3 rows between each cell I select to copy. The result is
50 cells selected with three rows in between each selected cell.

This is tedious work and I need a macro that would ask me three questions
before I run it:

Question One: What is the first cell you want to copy?

My answer is : "A1"

Question Two: Total number of cells you want to copy following Cell "A1"?

My answer is : X (Could be 25, 30, 40 could be any number)

Question Three: How many rows do you want to skip between each of the copied
cells starting with cell "A1" ?

My answer is : X (could be 3, 4, 5, 6, 7, could be any number)

IS such a macro possible? I need to set this up because I am spending too
much time doing this custom type of copying over and over again. I need to
tell Excel how many rows to skip between each copied cell. If any one can
help me out in developing such a Macro I would be very grateful.

Thanks


binar[_2_]

Selective Copying with skipping rows in between Macro help ple
 
OssieMac,
Thanks for your post. I'm pasting all cells to another spreadsheet.
Moreover, I discovered an app today that enables one to record one's mouse
movement as a macro. Check it out:

http://www.tethyssolutions.com/product.htm

For right now I'm going to try out this app and not pursue a development of
a VBA macro. Thanks for your help.



"OssieMac" wrote:

Hi binar,

re Question Two: Total number of cells you want to copy following Cell "A1"?

This total number of cells would it always go to the bottom of the column?
if so, not necessary to enter the number; the system can count them.

Where are you pasting the copied cells? This needs to be done in the code
because there are a maximum number of cells that can be copied using VBA the
way you are doing it. (Run into problems with string lengths). The copy/paste
needs to be done with each cell in the code.

Selection of the first cell to copy and the number of cells to skip can be
done with the inputbox and the user actually selecting the first cell then
the first cells to skip. Could also include selecting the first cell of the
destination.


--
Regards,

OssieMac


"binar" wrote:

Fellow Forum Members,
I would appreciate it a lot if someone can help me develop a macro that will
let me selectively copy cells and allow me to control the quantity of rows I
need skipped between each copied cell.

Currently I press the CONTROL button and manually select 50 cells in "Column
A" and manually skip 3 rows between each cell I select to copy. The result is
50 cells selected with three rows in between each selected cell.

This is tedious work and I need a macro that would ask me three questions
before I run it:

Question One: What is the first cell you want to copy?

My answer is : "A1"

Question Two: Total number of cells you want to copy following Cell "A1"?

My answer is : X (Could be 25, 30, 40 could be any number)

Question Three: How many rows do you want to skip between each of the copied
cells starting with cell "A1" ?

My answer is : X (could be 3, 4, 5, 6, 7, could be any number)

IS such a macro possible? I need to set this up because I am spending too
much time doing this custom type of copying over and over again. I need to
tell Excel how many rows to skip between each copied cell. If any one can
help me out in developing such a Macro I would be very grateful.

Thanks



All times are GMT +1. The time now is 06:33 AM.

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