+ Reply to Thread
Results 1 to 5 of 5

application.transpose, type mismatch

  1. #1
    Registered User
    Join Date
    01-22-2013
    Location
    United Kingdom
    MS-Off Ver
    Excel 2000 and Excel 2007
    Posts
    9

    Cool application.transpose, type mismatch

    Hi All,

    I'm using excel 2007 (but also excel 2000! ). I have imported a selection from a worksheet into an array and need to run some functions on the array such as the transpose function ( application.transpose(Arr) where Arr is a variant array). However it's comes up with a type mismatch error. I've narrowed the issue down to being the length of an array item being more than 255 characters long. As long as all entries in each cell that are to be imported are no more than 255 characters everything works fine. However I have to handle this scenario and so please could some one advise how best to do it.

    Examples of the string I have to handle but the text could be anything really - I'd say to cpoe with 1000 characters would be plenty.

    cell A1: Brand & other related char type changed to Asda Chosen By you & flavour changed to Smoky Barbecue. http://groceries.asda.com/asda-estor...requestid=4447

    cell A2: Brand & other related char type changed to Asda Chosen By you & flavour changed to Smoky Barbecue. http://groceries.asda.com/asda-estor...questid=444767

    cell A3: Brand & other related char type changed to Asda Chosen By you as well as flavour also changed to Chilli Cheese as per http://groceries.asda.com/asda-estor...questid=430427

    Hope someone can help

    Many thanks

    Rodp

  2. #2
    Forum Guru JosephP's Avatar
    Join Date
    03-27-2012
    Location
    Ut
    MS-Off Ver
    2003/10
    Posts
    7,328

    Re: application.transpose, type mismatch

    you'll need to create another array and loop through the first one transposing into the second
    Josie

    if at first you don't succeed try doing it the way your wife told you to

  3. #3
    Registered User
    Join Date
    01-22-2013
    Location
    United Kingdom
    MS-Off Ver
    Excel 2000 and Excel 2007
    Posts
    9

    Re: application.transpose, type mismatch

    Quote Originally Posted by JosephP View Post
    you'll need to create another array and loop through the first one transposing into the second
    Hi JosephP,

    Thanks for the reply. I thought about doing this but I fear that I'll hit other problems as there are many other excel / vba functions I call on in my complete routine which also might fall over due to this limit. Therefore is there a more permanent / flexible solution?

    I thought splitting the array item in question to create a multiple dimension array but that just compounds the issue if you're then trying to do eg a simple vba function which you don't have the rights to access the underlying code.

    Any other thoughts most welcome.

    Thanks

    RodP

  4. #4
    Forum Guru JosephP's Avatar
    Join Date
    03-27-2012
    Location
    Ut
    MS-Off Ver
    2003/10
    Posts
    7,328

    Re: application.transpose, type mismatch

    you'd have to do something like that and then test every element you process to see if it is also an array then loop through it if need be

    or upgrade to a better version of course ;-)

  5. #5
    Registered User
    Join Date
    01-22-2013
    Location
    United Kingdom
    MS-Off Ver
    Excel 2000 and Excel 2007
    Posts
    9

    Re: application.transpose, type mismatch

    Quote Originally Posted by JosephP View Post
    you'd have to do something like that and then test every element you process to see if it is also an array then loop through it if need be

    or upgrade to a better version of course ;-)
    Hmmm - well that's a no goer then. Well we're unlikely to ungrade excel any time soon (it took 10 years to move from excel 2000 to 2007!!). If any one else comes up with a solution then do let me know.

    Thanks

    RodP

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

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