+ Reply to Thread
Results 1 to 4 of 4

Defined Arrays

  1. #1
    Registered User
    Join Date
    11-07-2012
    Location
    UK
    MS-Off Ver
    Excel 2003
    Posts
    6

    Defined Arrays

    I have been banging my head on the table trying to solve this for the last two days. I would be absolutely grateful if someone could help me here.

    The actual piece of work that I am working on is too complicated to post here. But I'll make things nice and simple just for the cause.

    I defined an array called "Test_1" containing digits {1,2,3,4,5}
    I then defined another array called "Test_2" containing a formula =MIN(Test_1,3)

    If I paste "Test_2" on the worksheet with =INDEX(Test_2,1) This gives me value 1
    But if I paste it with =INDEX(Test_2,2) up to index of 5, it gives me #REF error.

    The reason is that "Test_2" doesn't become an array and all it does is picks the min value from the entire "Test_1" (which is 1) and compares it with 3 and returns 1. However, what I would like "Test_2" to do is compare every single value in "Test_1" against the number 3 and record it as an array.

    Does anyone know how to make this possible? How do I make "Test_2" store {1,2,3,3,3} values?

    Thanks

  2. #2
    Forum Guru Kaper's Avatar
    Join Date
    12-14-2013
    Location
    Warsaw, Poland
    MS-Off Ver
    most often: Office 365 in Windows environment
    Posts
    8,619

    Re: Defined Arrays

    have you tried simple
    Test_2
    Formula: copy to clipboard
    Please Login or Register  to view this content.
    Best Regards,

    Kaper

  3. #3
    Registered User
    Join Date
    11-07-2012
    Location
    UK
    MS-Off Ver
    Excel 2003
    Posts
    6

    Re: Defined Arrays

    Thanks Kaper.

    Your suggestion is working for the example that I gave. But the actual code that I am working on is way more complicated. However, your suggestion has helped me in figuring a way out of my problem so thanks. :D

  4. #4
    Forum Guru Kaper's Avatar
    Join Date
    12-14-2013
    Location
    Warsaw, Poland
    MS-Off Ver
    most often: Office 365 in Windows environment
    Posts
    8,619

    Re: Defined Arrays

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

+ 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. loading arrays into my user defined function
    By mnorth17 in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 01-16-2014, 12:39 PM
  2. UBound with Arrays of User-Defined DataTypes
    By CrazyFileMaker in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 05-01-2009, 06:17 PM
  3. passing arrays to user defined functions
    By ramki in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 02-15-2006, 04:40 AM
  4. Passing Arrays in User Defined Objects
    By Developer of the Caribbean in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 09-09-2005, 10:05 PM
  5. Arrays in User defined functions
    By Naomi in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 03-09-2005, 11:06 AM

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