+ Reply to Thread
Results 1 to 3 of 3

Runtime error 13 - type mismatch

  1. #1
    Registered User
    Join Date
    05-24-2014
    Posts
    3

    Runtime error 13 - type mismatch

    Hello,

    I have a VBA code that run for a set of data(all in numbers). The code is totally fine when it is run for the first time. But when I run it again, the error - "type mismatch" will come out. When I open a new excel workbook and paste all the data and code into it, it works at the first time. But the error will pop up again if i run for the second time. Can anyone help to solve?
    Thanks a lot for the help!

    My code is as below: (the red line is where the error message pop out)

    Please Login or Register  to view this content.

  2. #2
    Valued Forum Contributor
    Join Date
    02-08-2012
    Location
    Newcastle, Australia
    MS-Off Ver
    Excel 2007 and Excel 2010
    Posts
    1,429

    Re: Runtime error 13 - type mismatch

    Hi,

    Possibly try changing
    Please Login or Register  to view this content.
    to
    Please Login or Register  to view this content.
    or simply just 0 (if you are multiplying by 0, you may as well skip the multiplication step...).

    My hopes aren't high for this as a solution, but if it doesn't work please upload your workbook (or a usable sample) so that I can debug the code in its original context.

    Thanks

  3. #3
    Valued Forum Contributor
    Join Date
    03-21-2013
    Location
    cyberia
    MS-Off Ver
    Excel 2007
    Posts
    457

    Re: Runtime error 13 - type mismatch

    Your purpose in multiplying by zero is unclear. Seems either to produce a zero, in which case you'd be better doing that directly, or to check if any non-numbers occur in your data.

    A cause for type mismatch error is trying to multiply a non-number (other than a blank) by a number (including zero).

    Track it down a bit more by replacing your red line by
    Please Login or Register  to view this content.

+ 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. Type Mismatch Runtime Error
    By Jaeger in forum Excel Programming / VBA / Macros
    Replies: 10
    Last Post: 02-21-2014, 10:49 AM
  2. [SOLVED] runtime error 13 type mismatch
    By chappie in forum Excel Programming / VBA / Macros
    Replies: 11
    Last Post: 08-30-2012, 10:12 PM
  3. Runtime Error 13 Type Mismatch
    By vtsoldier2010 in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 03-30-2012, 12:59 PM
  4. Runtime Error 13 - type mismatch
    By hindlehey in forum Excel General
    Replies: 1
    Last Post: 11-07-2005, 10:55 AM
  5. Runtime Error '13': Type mismatch
    By Linking to specific cells in pivot table in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 05-18-2005, 03: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