PC Review


Reply
Thread Tools Rate Thread

Copying a Variable Number of Rows

 
 
PMC527@gmail.com
Guest
Posts: n/a
 
      19th Aug 2007
Hello,

I actually have 2 issues I am trying to solve. I am taking data and
stacking it on top to have 1 row of data to run correlations.

I have a cell (N_Size) that has the number of rows I want to be
selected starting at D3. I don't know how to reference this named
cell to select the number of rows specified in it.

Next I don't know how to loop this code to repeat X amount of times to
stack the data on top of each other.

So just as an example, I have a 150 in B3 (# of rows wanted to be
selected in D3) and 5 in B5 (# of columns that I want stacked on top
of each other starting with D3). How do I get this to happen in a VBA
code.

Thanks for any help/guidance you can give.

PC

 
Reply With Quote
 
 
 
 
=?Utf-8?B?Sm9lbA==?=
Guest
Posts: n/a
 
      19th Aug 2007
writedata = 5
for RowOff = 0 to Range("B3")
for ColOff = 0 to Range("B5")
Range("D3").offset(rowoffset:=Rowoff,columnoffset:=coloff) = writedata
next Coloff
Rowoff

"(E-Mail Removed)" wrote:

> Hello,
>
> I actually have 2 issues I am trying to solve. I am taking data and
> stacking it on top to have 1 row of data to run correlations.
>
> I have a cell (N_Size) that has the number of rows I want to be
> selected starting at D3. I don't know how to reference this named
> cell to select the number of rows specified in it.
>
> Next I don't know how to loop this code to repeat X amount of times to
> stack the data on top of each other.
>
> So just as an example, I have a 150 in B3 (# of rows wanted to be
> selected in D3) and 5 in B5 (# of columns that I want stacked on top
> of each other starting with D3). How do I get this to happen in a VBA
> code.
>
> Thanks for any help/guidance you can give.
>
> PC
>
>

 
Reply With Quote
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

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


Similar Threads
Thread Thread Starter Forum Replies Last Post
Re: Copying a variable nuimber of rows Rick Rothstein Microsoft Excel Programming 0 11th May 2010 06:26 PM
RE: Copying a variable nuimber of rows Mike H Microsoft Excel Programming 0 11th May 2010 11:29 AM
Copying (variable) rows from another spreadsheet Tommy Microsoft Excel Programming 1 6th Jan 2009 02:02 PM
Macro for copying a value to a variable no. of rows Ian Grega Microsoft Excel Misc 6 15th Apr 2008 02:48 PM
Copying range to variable number of rows =?Utf-8?B?bm9zcGFtaW5saWNo?= Microsoft Excel Programming 2 1st Dec 2005 11:34 PM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 05:30 AM.