+ Reply to Thread
Results 1 to 12 of 12

Application.Transpose(junk_array) .....gives type mismatch error

  1. #1
    Forum Contributor
    Join Date
    12-01-2007
    Location
    USA-North Carolina
    MS-Off Ver
    MS Office 2016
    Posts
    2,662

    Application.Transpose(junk_array) .....gives type mismatch error

    Hi,

    I get a run time error in my code when i take an array such as this
    Please Login or Register  to view this content.
    apparently when you try to transpose an array such as the one above and it has more than ~65000 elements and you then use this

    Please Login or Register  to view this content.
    you get a type mismatch error



    anyone know of a workaround?

  2. #2
    Forum Expert nilem's Avatar
    Join Date
    10-22-2011
    Location
    Ufa, Russia
    MS-Off Ver
    2013
    Posts
    3,377

    Re: Application.Transpose(junk_array) .....gives type mismatch error

    Hi,
    just for example
    Please Login or Register  to view this content.

  3. #3
    Forum Contributor
    Join Date
    12-01-2007
    Location
    USA-North Carolina
    MS-Off Ver
    MS Office 2016
    Posts
    2,662

    Re: Application.Transpose(junk_array) .....gives type mismatch error

    thanks...........is there a "faster" way to transpose the array?

  4. #4
    Forum Guru Izandol's Avatar
    Join Date
    03-29-2012
    Location
    *
    MS-Off Ver
    Excel 20(03|10|13)
    Posts
    2,581

    Re: Application.Transpose(junk_array) .....gives type mismatch error

    There is interesting discussion of transposing here: http://www.vbaexpress.com/forum/show...rther-analysis

  5. #5
    Forum Contributor
    Join Date
    12-01-2007
    Location
    USA-North Carolina
    MS-Off Ver
    MS Office 2016
    Posts
    2,662

    Re: Application.Transpose(junk_array) .....gives type mismatch error

    I will take a look at it. thanks.

  6. #6
    Forum Expert nilem's Avatar
    Join Date
    10-22-2011
    Location
    Ufa, Russia
    MS-Off Ver
    2013
    Posts
    3,377

    Re: Application.Transpose(junk_array) .....gives type mismatch error

    Quote Originally Posted by welchs101 View Post
    ..is there a "faster" way to transpose the array?
    I think this is a faster way to fill the output array at a time when unique keys fall into the dictionary (You use the dictionary, is not it?)

  7. #7
    Forum Contributor
    Join Date
    12-01-2007
    Location
    USA-North Carolina
    MS-Off Ver
    MS Office 2016
    Posts
    2,662

    Re: Application.Transpose(junk_array) .....gives type mismatch error

    nilem, not sure I understand........can you give example.....does not have to be a detailed example just something to help me understand

  8. #8
    Forum Expert nilem's Avatar
    Join Date
    10-22-2011
    Location
    Ufa, Russia
    MS-Off Ver
    2013
    Posts
    3,377

    Re: Application.Transpose(junk_array) .....gives type mismatch error

    here you go
    Please Login or Register  to view this content.

  9. #9
    Forum Guru
    Join Date
    08-15-2004
    Location
    Tokyo, Japan
    MS-Off Ver
    2013 O.365
    Posts
    22,518

    Re: Application.Transpose(junk_array) .....gives type mismatch error

    welchs101

    No need to prepare output array
    Please Login or Register  to view this content.

  10. #10
    Forum Contributor
    Join Date
    12-01-2007
    Location
    USA-North Carolina
    MS-Off Ver
    MS Office 2016
    Posts
    2,662

    Re: Application.Transpose(junk_array) .....gives type mismatch error

    i will take a look at the codes .......... as usual I will probably have questions.

    thanks!

  11. #11
    Forum Contributor
    Join Date
    12-01-2007
    Location
    USA-North Carolina
    MS-Off Ver
    MS Office 2016
    Posts
    2,662

    Re: Application.Transpose(junk_array) .....gives type mismatch error

    quick question:
    Now the "application.transpose(junk_arry)" will produce a runtime type mismatch error when junk_array contains more than say 2^16 values.

    Will the "Resize" function also have the same problem? I am not at a computer that has excel 2007 or higher right now so I can not test. But this was my first questions.

    Second question is this. The application.transpose function does not really work for when an array has more than 2^16 elements in it....is there a web site, paper, book, or something one can reference to view "other" similar type issues. I hate finding out "after the fact" that some piece of code does not work because of a size limitation.

  12. #12
    Forum Guru
    Join Date
    08-15-2004
    Location
    Tokyo, Japan
    MS-Off Ver
    2013 O.365
    Posts
    22,518

    Re: Application.Transpose(junk_array) .....gives type mismatch error

    The size of array depends on the memory.
    Please Login or Register  to view this content.
    As I mentioned in the other thread, loop is the fastest afaik.

+ 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. application.transpose, type mismatch
    By rodpestell in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 05-02-2013, 12:22 PM
  2. Using Application.Inputbox.........getting type mismatch error
    By welchs101 in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 07-21-2011, 07:33 AM
  3. Application.GetOpenFilename Type mismatch error
    By brl8 in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 01-03-2011, 04:56 PM
  4. Replies: 5
    Last Post: 07-27-2010, 10:58 AM
  5. Application.Vlookup Type Mismatch Error
    By ssjody in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 08-02-2006, 05:24 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