+ Reply to Thread
Results 1 to 11 of 11

Macro won't transpose my array

  1. #1
    Registered User
    Join Date
    11-29-2016
    Location
    Vancouver, Canada
    MS-Off Ver
    2011
    Posts
    7

    Macro won't transpose my array

    Hi all,

    I created a macro that loops through some sensitive documents in order to create an array. However, when I try to transpose my array back into excel I'm receiving Error 13: Mismatch error.

    I've provided some images for clarification. Is there something wrong with my code? Any help is much appreciated.

    Thanks,

    G
    Attached Images Attached Images

  2. #2
    Forum Expert
    Join Date
    03-28-2012
    Location
    TBA
    MS-Off Ver
    Office 365
    Posts
    12,454

    Re: Macro won't transpose my array

    The range object seems to me in incorrect.
    Most likely.

    Please Login or Register  to view this content.
    Last edited by AB33; 11-29-2016 at 06:12 PM.

  3. #3
    Registered User
    Join Date
    11-29-2016
    Location
    Vancouver, Canada
    MS-Off Ver
    2011
    Posts
    7

    Re: Macro won't transpose my array

    @AB33 Thanks for responding! I'm still having some troubles even with your line of syntax. That's why I'm confused because the range object is actually correct. I'm transposing an array of 10 rows, 5706 columns so I'm not sure why my syntax and yours won't work. If you need me to submit additional information please let me know.

  4. #4
    Forum Expert
    Join Date
    03-28-2012
    Location
    TBA
    MS-Off Ver
    Office 365
    Posts
    12,454

    Re: Macro won't transpose my array

    On my test it works even if you flip flop the boundaries. About 7000 columns and 10 rows

    Please Login or Register  to view this content.

  5. #5
    Registered User
    Join Date
    11-29-2016
    Location
    Vancouver, Canada
    MS-Off Ver
    2011
    Posts
    7

    Re: Macro won't transpose my array

    Hmm.. that is strange. Do you know what else might be affecting it? I'm still receiving the type mismatch Error 13.

  6. #6
    Forum Expert
    Join Date
    03-28-2012
    Location
    TBA
    MS-Off Ver
    Office 365
    Posts
    12,454

    Re: Macro won't transpose my array

    It is difficult to pin point as to why, but if you could an excel sample book with the code, I might see it.
    I know Transpose has a limit of 65k rows, but you have not reached the limit.
    Just before you write back to excel you could try

    Debug.Print newarray
    and see if there is an error.

  7. #7
    Registered User
    Join Date
    11-29-2016
    Location
    Vancouver, Canada
    MS-Off Ver
    2011
    Posts
    7

    Re: Macro won't transpose my array

    Debug.Print newarray provides me with a compile error: Type Mismatch.

    I'll see if I can provide a copy of a sample book.
    Attached Files Attached Files
    Last edited by georgieporgie; 11-30-2016 at 02:16 PM. Reason: Added Sample Workbook

  8. #8
    Forum Expert
    Join Date
    03-28-2012
    Location
    TBA
    MS-Off Ver
    Office 365
    Posts
    12,454

    Re: Macro won't transpose my array

    In that case, the issue is with newarray, not transferring the array in to sheet.

  9. #9
    Registered User
    Join Date
    11-29-2016
    Location
    Vancouver, Canada
    MS-Off Ver
    2011
    Posts
    7

    Re: Macro won't transpose my array

    I'm not entirely sure about that either because I have tried transferring newarray to my sheet WITHOUT transposing the information and the result is perfect. Not only that, but if I manually transpose the range onto the correct sheet, I am getting the results I want the macro to achieve autonomously.

    Have a look at the workbook and tell me what you think could be causing this.

  10. #10
    Registered User
    Join Date
    11-29-2016
    Location
    Vancouver, Canada
    MS-Off Ver
    2011
    Posts
    7

    Re: Macro won't transpose my array

    I'm not entirely sure about that either because I have tried transferring newarray to my sheet WITHOUT transposing the information and the result is perfect. Not only that, but if I manually transpose the range onto the correct sheet, I am getting the results I want the macro to achieve autonomously.

    Have a look at the workbook and tell me what you think could be causing this.

  11. #11
    Forum Expert
    Join Date
    03-28-2012
    Location
    TBA
    MS-Off Ver
    Office 365
    Posts
    12,454

    Re: Macro won't transpose my array

    I can not test it as you have two different workbooks and many sheets, but I am also not surprised you are getting an error. There can only be one active workbook at a time. If the code works on a single book, the error can only attribute to working on two books.
    This is my idea. Instead of opening two books at a time. Open one workbook, load the array and close it and you then work on a single book. Unless you are using range, you do not need to open two books. Once you loaded the data, do not refer it on your code

+ 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. [SOLVED] Need help with transpose / array formule.
    By wikkum in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 10-17-2015, 07:05 PM
  2. Possible Array, or Transpose?
    By no1_fred in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 08-28-2015, 02:22 PM
  3. Transpose Array VBA Script
    By King_Yoshi in forum Excel Programming / VBA / Macros
    Replies: 29
    Last Post: 09-02-2014, 08:16 PM
  4. [SOLVED] Transpose a table's first row into an array
    By jimmalk in forum Excel Programming / VBA / Macros
    Replies: 6
    Last Post: 11-23-2012, 05:33 AM
  5. [SOLVED] How to transpose a bidimenional array
    By nemo66ro in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 11-05-2012, 07:10 AM
  6. [SOLVED] Transpose an Array
    By Aphyx in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 07-28-2012, 10:51 AM
  7. [SOLVED] Out of Memory: Array Transpose
    By TheVisionThing in forum Excel Programming / VBA / Macros
    Replies: 10
    Last Post: 05-01-2005, 04: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