+ Reply to Thread
Results 1 to 4 of 4

Extract a column from 2d array into 1d array

  1. #1
    Registered User
    Join Date
    04-07-2013
    Location
    Canada
    MS-Off Ver
    Excel 2010
    Posts
    8

    Question Extract a column from 2d array into 1d array

    Hi guys, i am struggling with the following:
    I have a VarMatrix (2d array). I want to find stdev of each column and write the result into VectorMatrix (1d array). Then I want to find min value in the VectorMatrix

    PHP Code: 
    For 5 To 16
              VectorMatrix
    (j) = WorksheetFunction.StDev(WorksheetFunction.Transpose(WorksheetFunction.Index(VaRMatrix01)))
    Next j

              K 
    WorksheetFunction.Min(WorksheetFunction.Index(VectorMatrix10)) 
    Sorry, I am new to VBA. Appreciate your help

  2. #2
    Forum Guru
    Join Date
    08-15-2004
    Location
    Tokyo, Japan
    MS-Off Ver
    2013 O.365
    Posts
    22,834

    Re: Extract a column from 2d array into 1d array

    Most probably problem is the types of elements in the array...
    This should work.
    Please Login or Register  to view this content.

  3. #3
    Registered User
    Join Date
    04-07-2013
    Location
    Canada
    MS-Off Ver
    Excel 2010
    Posts
    8

    Re: Extract a column from 2d array into 1d array

    Thank you for the ReDim tip, I defined an array with incorrect amount of row. Other syntax is correct. Solved

  4. #4
    Forum Guru
    Join Date
    08-15-2004
    Location
    Tokyo, Japan
    MS-Off Ver
    2013 O.365
    Posts
    22,834

    Re: Extract a column from 2d array into 1d array

    If that takes care of your original question, select Thread Tools from the menu link above and mark this thread as SOLVED.

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. [SOLVED] Find cell in 2nd array using row and column from the first array Excel 2010 VBA
    By crywolf in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 08-08-2015, 02:12 PM
  2. [SOLVED] 2 Column Lookup with 6 Column array Col index number is Varies Within Entire Array
    By Weasyb in forum Excel Formulas & Functions
    Replies: 6
    Last Post: 08-05-2015, 12:54 PM
  3. [SOLVED] Extract a column from an Array VBA
    By cmore in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 10-14-2013, 03:00 PM
  4. Replies: 6
    Last Post: 09-25-2013, 10:08 PM
  5. [SOLVED] What is wrong with this code? (Extract Row from 2D array to 1D array)
    By mc84excel in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 05-10-2013, 07:17 AM
  6. Single Conditional Array x two Multi-Column Array - Approach needed
    By David Brown in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 09-28-2010, 11:41 AM

Tags for this Thread

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