+ Reply to Thread
Results 1 to 2 of 2

filling an aray without looping

Hybrid View

  1. #1
    mark@sentryi.com
    Guest

    filling an aray without looping

    Is it possible to simply fill it by using an array formula without
    looping
    to fill it in the same way as you can fill a range with an array such
    as:

    Range("C1:E20).FormulaArray =
    Application.WorksheetFunction.MMult(InvVCVRange, AlphaRange)


    By (after rediming it) saying: Array (3,20) =
    Application.WorksheetFunction.MMult(Range1, Range2)

    Thks, Mark


  2. #2
    JE McGimpsey
    Guest

    Re: filling an aray without looping

    You can assign the result of MMult to a variant:

    Dim vArray As Variant
    Dim i As Long
    Dim j As Long

    vArray = Application.MMult(Range("A1:A10"), Range("B1:K1"))

    For i = 1 To UBound(vArray, 1)
    For j = 1 To UBound(vArray, 2)
    Debug.Print "vArray(" & i & "," & j & "): " & vArray(i, j)
    Next j
    Next i



    In article <1118331152.481854.323070@f14g2000cwb.googlegroups.com>,
    mark@sentryi.com wrote:

    > Is it possible to simply fill it by using an array formula without
    > looping
    > to fill it in the same way as you can fill a range with an array such
    > as:
    >
    > Range("C1:E20).FormulaArray =
    > Application.WorksheetFunction.MMult(InvVCVRange, AlphaRange)
    >
    >
    > By (after rediming it) saying: Array (3,20) =
    > Application.WorksheetFunction.MMult(Range1, Range2)
    >
    > Thks, Mark


+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1