PC Review


Reply
Thread Tools Rate Thread

copy a 2 dimensional array to a range

 
 
avi
Guest
Posts: n/a
 
      25th Oct 2011
Hello,

What would be the most fastest way to copy a 2 dimensional array (rXc)
to a range starting at cell A1?

Thanks
Avi
 
Reply With Quote
 
 
 
 
Rick Rothstein
Guest
Posts: n/a
 
      25th Oct 2011
> What would be the most fastest way to copy a 2 dimensional
> array (rXc) to a range starting at cell A1?


Let's say your array's name is ARR. Assuming your array is one-based (not
zero-based), then this line of code will do what you asked for...

Range("A1").Resize(UBound(Arr, 1), UBound(Arr, 2)) = ARR

Rick Rothstein (MVP - Exce)

 
Reply With Quote
 
avi
Guest
Posts: n/a
 
      25th Oct 2011
On 25 oct, 19:27, "Rick Rothstein"
<rick.newsNO.S...@NO.SPAMverizon.net> wrote:
> > What would be the most fastest way to copy a 2 dimensional
> > array (rXc) to a range starting at cell A1?

>
> Let's say your array's name is ARR. Assuming your array is one-based (not
> zero-based), then this line of code will do what you asked for...
>
> Range("A1").Resize(UBound(Arr, 1), UBound(Arr, 2)) = ARR
>
> Rick Rothstein (MVP - Exce)


Many thanks. It works !

Avi
 
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



Features
 

Advertising
 

Newsgroups
 


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