Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 24
Default 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
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 2,510
Default 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

  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 24
Default 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

Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Copying selective data leerem Excel Discussion (Misc queries) 3 August 3rd 08 04:41 PM
Copying and skipping (adding) rows [email protected] Excel Programming 1 January 22nd 06 06:35 PM
Copying Selective columns Oldjay[_2_] Excel Programming 1 October 18th 05 11:05 PM
Skipping empty rows when copying a formula down a column Rachel Jones Excel Programming 1 July 31st 03 03:55 AM
Macro skipping even rows Bob Phillips[_5_] Excel Programming 5 July 26th 03 12:29 PM


All times are GMT +1. The time now is 04:45 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"