Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 2
Default speedy way to set values in a range

Hi
I have a list of data that I want to put into a range in excel, and I want to know the fastest way of doing it

I have tried setting each cell value. That is around 0.2 seconds per cell. I have also tried setting an array of the values, and then stepping through the array and putting the value in the range with
range_values(i) = array_values(i
This cuts it down to around 0.15 seconds per cell.

Isn't there a faster way? With 100 cells, this gets pretty slow.
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 7,247
Default speedy way to set values in a range

You can assign an entire array to a range with one statement.
E.g.,


Range("A1:A10").Value = Application.Transpose(array_values)


--
Cordially,
Chip Pearson
Microsoft MVP - Excel
Pearson Software Consulting, LLC
www.cpearson.com



"emg178" wrote in message
...
Hi,
I have a list of data that I want to put into a range in excel,

and I want to know the fastest way of doing it.

I have tried setting each cell value. That is around 0.2

seconds per cell. I have also tried setting an array of the
values, and then stepping through the array and putting the value
in the range with
range_values(i) = array_values(i)
This cuts it down to around 0.15 seconds per cell.

Isn't there a faster way? With 100 cells, this gets pretty

slow.


  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 783
Default speedy way to set values in a range

emg178 wrote:

Hi,
I have a list of data that I want to put into a range in excel, and I want to know the fastest way of doing it.

I have tried setting each cell value. That is around 0.2 seconds per cell. I have also tried setting an array of the values, and then stepping through the array and putting the value in the range with
range_values(i) = array_values(i)
This cuts it down to around 0.15 seconds per cell.

Isn't there a faster way? With 100 cells, this gets pretty slow.


range_values.Value = array_values

Alan Beban
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
calculate values in an unlimited range of cells in a column WITHOUTalso calculating values that had previously been filtered AGAINST? yadang Excel Discussion (Misc queries) 2 October 1st 09 06:18 PM
SUMPRODUCT or SUMIF if any values in a range equal any values in another range PCLIVE Excel Worksheet Functions 3 July 15th 09 07:43 PM
speedy way to do array-frequency? Seeker Excel Discussion (Misc queries) 0 April 5th 09 04:03 AM
Speedy way to create IF Function H0MELY Excel Worksheet Functions 3 February 10th 06 06:57 AM
Search/Filter to find values in another range based on two cell values Andy Excel Programming 2 April 29th 04 04:08 PM


All times are GMT +1. The time now is 03:26 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"