+ Reply to Thread
Results 1 to 4 of 4

Allocating array

  1. #1
    Forum Contributor
    Join Date
    01-28-2013
    Location
    sweden
    MS-Off Ver
    Excel 2010
    Posts
    108

    Allocating array

    Hi,

    I am allocating an array with a for loop like this

    Please Login or Register  to view this content.
    Meaning OutcomeArr will recieve value 0 if no occurrences for MyIdArr(i) in MyResultArr.

    My question is if I can set these to NULL instead of 0? Simply remove rows in OutcomeArr?

  2. #2
    Forum Guru xlnitwit's Avatar
    Join Date
    06-27-2016
    Location
    London
    MS-Off Ver
    Windows: 2010; Mac: 16.13 (O365)
    Posts
    7,085

    Re: Allocating array

    Yes- you can use a counter variable instead of i to populate only rows that have values in OutcomeArr and then resize the array at the end if necessary.
    Don
    Please remember to mark your thread 'Solved' when appropriate.

  3. #3
    Forum Guru
    Join Date
    07-25-2011
    Location
    Florida
    MS-Off Ver
    Excel 2003
    Posts
    9,643

    Re: Allocating array

    Not sure I understand your question.

    If h = 0, this will not add the MyIdArr to OutcomeArr

    Please Login or Register  to view this content.
    Surround your VBA code with CODE tags e.g.;
    [CODE]your VBA code here[/CODE]
    The # button in the forum editor will apply CODE tags around your selected text.

  4. #4
    Forum Contributor
    Join Date
    01-28-2013
    Location
    sweden
    MS-Off Ver
    Excel 2010
    Posts
    108

    Re: Allocating array

    Thanks, works just perfect.

+ 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. need help in allocating slot !!!
    By sivakumarc in forum Excel General
    Replies: 1
    Last Post: 06-12-2016, 01:30 PM
  2. [SOLVED] Point allocating
    By TrendyUK in forum Excel Formulas & Functions
    Replies: 8
    Last Post: 05-25-2016, 05:19 AM
  3. [SOLVED] Allocating data by age
    By Steven T in forum Excel General
    Replies: 8
    Last Post: 05-28-2012, 09:55 AM
  4. Allocating info
    By MikeNZ in forum Excel General
    Replies: 5
    Last Post: 08-03-2009, 12:30 PM
  5. [SOLVED] Allocating a value to text
    By Steve in forum Excel General
    Replies: 4
    Last Post: 02-19-2006, 02:10 PM
  6. Allocating a value from a cell
    By babygoode in forum Excel Formulas & Functions
    Replies: 18
    Last Post: 09-06-2005, 07:05 PM
  7. Allocating a Value
    By Raymond Gallegos in forum Excel Formulas & Functions
    Replies: 1
    Last Post: 01-06-2005, 10:06 PM

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