+ Reply to Thread
Results 1 to 3 of 3

Keep getting an error when trying to return array from function

  1. #1
    Registered User
    Join Date
    06-27-2013
    Location
    Arizona, US
    MS-Off Ver
    Excel 2010
    Posts
    24

    Keep getting an error when trying to return array from function

    I just can't seem to get this code to work properly.... Can anyone help me out Thanks,
    -Tyler



    Please Login or Register  to view this content.
    Here is the portion which calls the function
    Please Login or Register  to view this content.

    The error I am getting is Type mismatch, but I guess i'm too stupid to see the issue xD.

  2. #2
    Administrator 6StringJazzer's Avatar
    Join Date
    01-27-2010
    Location
    Tysons Corner, VA, USA
    MS-Off Ver
    MS365 Family 64-bit
    Posts
    24,721

    Re: Keep getting an error when trying to return array from function

    Can you be more specific? What line does the error occur on?
    Jeff
    | | |會 |會 |會 |會 | |:| | |會 |會
    Read the rules
    Use code tags to [code]enclose your code![/code]

  3. #3
    Forum Guru MarvinP's Avatar
    Join Date
    07-23-2010
    Location
    Woodinville, WA
    MS-Off Ver
    Office 365
    Posts
    16,167

    Re: Keep getting an error when trying to return array from function

    Hi cosmicwinds...

    In looking at your code, it looks like you are trying to open a group (perhaps a single) file or table. Then you seem to go through some cleanup using array functions. You need to know that arrays start with a zero base.

    I have another suggestion that might be better....

    Excel 2010 and 2013 have an Add-in called Power Query that will open a group of files or single file and do cleaning on it. You will need to install this add-in but it looks like it is what you are really looking for. Think of Power Query of a tool, like Pivot Tables or Charts that has been added to Excel to do these type of import and cleanup tasks.

    https://www.microsoft.com/en-us/down...9-b3402ee5376b
    One test is worth a thousand opinions.
    Click the * Add Reputation below to say 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. UDF array function doesn't return array
    By taikalusikka in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 01-18-2016, 08:06 AM
  2. [SOLVED] Redum Preserve Array Return Subscript Error
    By goss in forum Excel Programming / VBA / Macros
    Replies: 11
    Last Post: 02-16-2014, 07:21 PM
  3. index function error using match function to get data from a cell in an array
    By mabildgaard in forum Excel Formulas & Functions
    Replies: 4
    Last Post: 10-17-2013, 02:21 AM
  4. Replies: 3
    Last Post: 09-28-2012, 10:00 AM
  5. Function that return Array
    By yellowpower in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 07-08-2011, 06:08 AM
  6. Function to return Array
    By Zandor435 in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 07-25-2008, 06:11 PM
  7. [SOLVED] Return Array from Function
    By [email protected] in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 01-10-2006, 03:55 PM

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