#1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 39
Default Array

I want to allow "TestArray" and "Result" to change. Instead of adjusting the
formula in column C, I want to write a code where a new array would be
generated and assigned a range on column C that would have the same number of
rolls as "TestArray" and "Result". For example,

In 1 instance, it would be:

TestArray Result New Array
1 1 1
2 2 4

In another instance:

1 2 2
1 3 3
4 2 8

When the rows increase, I don't want to copy and paste the formula.

-- Thanks!


"Alan Beban" wrote:

You don't need code . If "TestArray" and "Result" are vertical ranges
then on the worksheet, array entered into C1:C3

=TestArray*Result

If "TestArray" and "Result" are horizontal ranges then

=TRANSPOSE(TestArray*Result)

Alan Beban



Daviv wrote:
I trying to mulitply range "TestArray" and "Result" to make array one and
transpose it on C1 to C3. "TestArray" and "Result" has 3 numbers each.

Sub Sheet_Fill_Array()
Dim one As Integer
one = SumProduct("TestArray", "Result")
Range("C1:C3").Value = Application.WorksheetFunction.Transpose(one)

End Sub


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
Complex conditional summing - array COUNT works, array SUM gives#VALUE fatcatfan Excel Worksheet Functions 4 November 18th 09 06:41 PM
Prevent cell/array references from changing when altering/moving thecell/array nme Excel Discussion (Misc queries) 1 September 19th 08 01:53 PM
meaning of : IF(Switch; Average(array A, array B); array A) DXAT Excel Worksheet Functions 1 October 24th 06 06:11 PM
Array problem: Key words-Variant Array, single-element, type mismatch error davidm Excel Programming 6 November 9th 05 05:54 AM
Array problem: Key words-Variant Array, single-element, type mismatch error davidm Excel Programming 1 November 8th 05 04:21 AM


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