+ Reply to Thread
Results 1 to 2 of 2

Performing Calculations on Array Data

  1. #1
    Registered User
    Join Date
    11-17-2014
    Location
    Canada
    MS-Off Ver
    2010
    Posts
    1

    Performing Calculations on Array Data

    Hi,

    I have some code which parses data coming from a trading client and arranges it into an array. I would like some help on how to go about performing calculations on the array data. Specifically, for example, how would I sum everything in column 2 of the array created. By the way, this array is constantly updated as trades come in. I am not familiar at all when it comes to arrays and programming. Any help would be great. The code for the parser is as follows:

    #Function PARSERTD(str As String) As Variant

    '' This function is used to parse the row & semi-colon delimited data output from RIT into a table

    Dim Rows() As String
    Dim Cols() As String
    Dim NoR As Integer
    Dim NoC As Integer
    If Len(Trim(str)) = 0 Then
    ReDim Res(0, 0) As String
    PARSERTD = Res
    Else
    Rows = Split(str, ";")
    Cols = Split(Rows(0), ",")
    NoR = UBound(Rows)
    NoC = UBound(Cols)
    ReDim Res(NoR + 1, NoC) As String
    For i = 0 To NoR
    Cols = Split(Rows(i), ",")
    For j = 0 To NoC
    Res(i, j) = Cols(j)
    Next j
    Next i
    PARSERTD = Res
    End If#
    Last edited by joeymountain; 11-17-2014 at 04:31 PM.

  2. #2
    Valued Forum Contributor xlbiznes's Avatar
    Join Date
    02-22-2013
    Location
    Bahrain
    MS-Off Ver
    Excel 2007
    Posts
    1,223

    Re: Performing Calculations on Array Data

    Welcome to the forum.

    Please enclose the code using code tags "#"
    Happy Computing ,

    Xlbiznes.

    To show your appreciation please click *

+ 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. Performing multiple calculations
    By halsall555 in forum Excel General
    Replies: 1
    Last Post: 10-13-2013, 12:08 PM
  2. Excel 2007 : Performing calculations in cells
    By morris_k in forum Excel General
    Replies: 2
    Last Post: 01-28-2012, 12:37 PM
  3. Performing Calculations on Newest Data
    By cameronfree in forum Excel General
    Replies: 1
    Last Post: 03-29-2011, 12:47 PM
  4. Performing calculations on the result of an array formula
    By AdamR in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 08-09-2009, 04:50 AM
  5. Performing calculations on arrays...
    By a303 in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 01-25-2007, 12:40 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