+ Reply to Thread
Results 1 to 7 of 7

type mismatch run time error 13

  1. #1
    Registered User
    Join Date
    07-25-2019
    Location
    Huddersfield
    MS-Off Ver
    Excel 2010
    Posts
    23

    type mismatch run time error 13

    Hi, I need help with this error please. One of my ex colleagues has left and he created a spreadsheet built with VB/Marcros. Basically there is 7 groups and it splits them all and creates separate excel spreadsheets when clicking the macro button. I had been using this all year but for some reason it brings up this error and highlighting this code:

    Please Login or Register  to view this content.
    Full code for marcro is this:

    Please Login or Register  to view this content.
    Attached Images Attached Images
    Last edited by Sandy2385; 07-25-2019 at 09:02 AM.

  2. #2
    Forum Expert Greg M's Avatar
    Join Date
    08-16-2007
    Location
    Dublin. Ireland
    MS-Off Ver
    Office 2016
    Posts
    4,520

    Re: type mismatch run time error 13

    Hi there,

    Just an untested knee-jerk suggestion:

    Please Login or Register  to view this content.

    Hope this helps,

    Regards,

    Greg M

  3. #3
    Registered User
    Join Date
    07-25-2019
    Location
    Huddersfield
    MS-Off Ver
    Excel 2010
    Posts
    23

    Re: type mismatch run time error 13

    Hi Greg,

    Thanks for reply. It still brings up same error and highlighted the same code. See attached.

    Thanks.
    Attached Images Attached Images

  4. #4
    Forum Guru TMS's Avatar
    Join Date
    07-15-2010
    Location
    The Great City of Manchester, NW England ;-)
    MS-Off Ver
    MSO 2007,2010,365
    Posts
    45,296

    Re: type mismatch run time error 13

    When the code stops, you need to check the values of grpNo and fltVal.

    The first so you know where in the loop you are and the second to see what you are filtering on.

    Then you need to check where the value comes from in the worksheet. May be that it has been edited inadvertently.



    Administrative Note:

    Welcome to the forum.

    We would very much like to help you with your query, however you need to include code tags around your code.

    Please take a moment to add the tags. Posting code between [CODE]Please [url=https://www.excelforum.com/login.php]Login or Register [/url] to view this content.[/CODE] tags makes your code much easier to read and copy for testing, and it also maintains VBA formatting.

    Please see Forum Rule #2 about code tags and adjust accordingly. Click on Edit to open your post, then highlight your code and click the # icon at the top of your post window. More information about these and other tags can be found here
    Trevor Shuttleworth - Retired Excel/VBA Consultant

    I dream of a better world where chickens can cross the road without having their motives questioned

    'Being unapologetic means never having to say you're sorry' John Cooper Clarke


  5. #5
    Registered User
    Join Date
    07-25-2019
    Location
    Huddersfield
    MS-Off Ver
    Excel 2010
    Posts
    23

    Re: type mismatch run time error 13

    Hi Thanks for reply.

    I have taken on your advice and you was right, it was something about my data. Each row has a group assigned, however one of the rows was showing as N/A. I deleted this row, and then re-ran. It works fine now, so thanks for your help

  6. #6
    Forum Guru TMS's Avatar
    Join Date
    07-15-2010
    Location
    The Great City of Manchester, NW England ;-)
    MS-Off Ver
    MSO 2007,2010,365
    Posts
    45,296

    Re: type mismatch run time error 13

    You're welcome.



    If you are satisfied with the solution(s) provided, please mark your thread as Solved.


    New quick method:
    Select Thread Tools-> Mark thread as Solved. To undo, select Thread Tools-> Mark thread as Unsolved.

    Or you can use this way:

    How to mark a thread Solved
    Go to the first post
    Click edit
    Click Go Advanced
    Just below the word Title you will see a dropdown with the word No prefix.
    Change to Solved
    Click Save


    You may also want to consider thanking those people who helped you by clicking on the little star at the bottom left of their reply to your question.

  7. #7
    Forum Expert Greg M's Avatar
    Join Date
    08-16-2007
    Location
    Dublin. Ireland
    MS-Off Ver
    Office 2016
    Posts
    4,520

    Re: type mismatch run time error 13

    Hi again,

    Many thanks for your very prompt feedback and also for the (undeserved ) Reputation increase - much appreciated.

    Glad to see that things are working correctly for you now.

    Best regards,

    Greg M

+ 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. Run time Error 13: type mismatch
    By DineshPawar in forum Excel General
    Replies: 1
    Last Post: 01-21-2017, 05:29 AM
  2. Run-Time Error '13' Type Mismatch
    By domgilberto in forum Excel Programming / VBA / Macros
    Replies: 9
    Last Post: 05-22-2016, 09:32 AM
  3. [SOLVED] Run-time error '13': type mismatch VBA
    By Johnatha in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 03-04-2016, 10:20 PM
  4. run time error '13' type mismatch
    By bqheng in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 10-27-2015, 08:11 PM
  5. Run-time error: Type mismatch
    By siamadu in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 02-11-2009, 03:12 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