+ Reply to Thread
Results 1 to 5 of 5

how to define a function with return multiple array

  1. #1
    Registered User
    Join Date
    11-16-2015
    Location
    London
    MS-Off Ver
    2013
    Posts
    51

    how to define a function with return multiple array

    How can I define a Function in VBA excel that returns two array?

  2. #2
    Forum Expert
    Join Date
    05-05-2015
    Location
    UK
    MS-Off Ver
    Microsoft Excel for Microsoft 365 MSO (Version 2402 Build 16.0.17328.20068) 64-bit
    Posts
    28,151

    Re: how to define a function with return multiple array

    Easier to answer if you provide a sample workbook.
    If that takes care of your original question, please select Thread Tools from the menu link above and mark this thread as SOLVED.

  3. #3
    Forum Expert
    Join Date
    10-06-2017
    Location
    drevni ruchadlo
    MS-Off Ver
    old
    Posts
    2,150

    Re: how to define a function with return multiple array

    Quote Originally Posted by niksirat2030 View Post
    ... Function in VBA ... that returns two array?
    And what does your input data look like ?

  4. #4
    Forum Expert
    Join Date
    08-17-2007
    Location
    Poland
    Posts
    2,206

    Re: how to define a function with return multiple array

    When creating a function, we generally think of returning a single value (array, object, etc.). But, by using parameters passed ByRef (the default way to pass arguments), you can return multiple values. And the result of a function, for example, can tell you whether the calculation was successful.
    Two examples of this approach:
    Please Login or Register  to view this content.
    The function can also return an array of arrays:
    Please Login or Register  to view this content.
    Artik
    Last edited by Artik; 09-04-2022 at 07:44 AM.

  5. #5
    Forum Expert
    Join Date
    10-06-2017
    Location
    drevni ruchadlo
    MS-Off Ver
    old
    Posts
    2,150

    Re: how to define a function with return multiple array


    Please Login or Register  to view this content.
    Last edited by mjr veverka; 09-04-2022 at 09:32 AM.

+ 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. Define activex combobox list by Array and def dbclick action in loop for multiple button
    By niksirat2030 in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 09-03-2022, 10:19 AM
  2. Define name/array based on multiple conditions
    By Ishcanter in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 05-12-2014, 01:10 AM
  3. Replies: 2
    Last Post: 03-26-2013, 01:33 AM
  4. Find a value in an array and return multiple values in an adjacent array
    By tonbra in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 02-02-2012, 08:35 PM
  5. How to return multiple column array without using Offset function?
    By agarwaldvk in forum Excel Formulas & Functions
    Replies: 7
    Last Post: 05-27-2008, 04:20 AM
  6. How to define an array in multiple parts (eg. for the function correl)
    By Smirgelius in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 03-10-2008, 01:13 AM
  7. Replies: 3
    Last Post: 03-01-2006, 08:45 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