+ Reply to Thread
Results 1 to 2 of 2

Pulling in values from array; always zero or one.

  1. #1
    Registered User
    Join Date
    04-06-2010
    Location
    NY
    MS-Off Ver
    Excel 2007
    Posts
    7

    Pulling in values from array; always zero or one.

    What I want to do is pull in specific values from a 3-dimensional array and then calculate the average of those values. Here is a snipet of my code:

    Please Login or Register  to view this content.
    When I use MsgBox to check the value of ValueArray(j, AR, i) it returns the proper value of 0.84623, so I know the array is holding the correct value. But once I pass that value to the variable called tempVal, the value of tempVal is 1. I cannot figure out what is going on here... is there some special way you need to get array values from a 3D array?

  2. #2
    Forum Guru Kyle123's Avatar
    Join Date
    03-10-2010
    Location
    Leeds
    MS-Off Ver
    365 Win 11
    Posts
    7,239

    Re: Pulling in values from array; always zero or one.

    tempVal is declared as a long, a long can only be a whole number

+ 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