Selective Copying with skipping rows in between Macro help please

B

binar

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
 
O

OssieMac

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.
 
B

binar

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.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top