+ Reply to Thread
Results 1 to 6 of 6

run type error type 13

  1. #1
    Forum Contributor
    Join Date
    10-04-2010
    Location
    London
    MS-Off Ver
    Office 365
    Posts
    455

    run type error type 13

    Hi guys,

    getting a run type error type 13 and not really understanding why.

    This is the portion of code which throws up the debugger. Its basically part of a macro which compares two sheets of data and highlights any differences in red. It worked perfectly last month but some data this month has caused it to now work

    Please Login or Register  to view this content.

  2. #2
    Forum Guru Andy Pope's Avatar
    Join Date
    05-10-2004
    Location
    Essex, UK
    MS-Off Ver
    O365
    Posts
    20,436

    Re: run type error type 13

    Any of those cells contain an error such as #DIV/0! or #VALUE! ?
    Cheers
    Andy
    www.andypope.info

  3. #3
    Forum Contributor
    Join Date
    10-04-2010
    Location
    London
    MS-Off Ver
    Office 365
    Posts
    455

    Re: run type error type 13

    Hi andy pope, no errors that i can see. There are N/A# values but this isn't causing the error

  4. #4
    Forum Guru Andy Pope's Avatar
    Join Date
    05-10-2004
    Location
    Essex, UK
    MS-Off Ver
    O365
    Posts
    20,436

    Re: run type error type 13

    Are you sure?

    When read into the array #N/A! will be stored as 'Error 2042' which in turn causes the Error Type 13.

  5. #5
    Forum Contributor
    Join Date
    10-04-2010
    Location
    London
    MS-Off Ver
    Office 365
    Posts
    455

    Re: run type error type 13

    I have some new information which may help this.

    I've noticed that if there are any values in columns X,Y or Z that are the value ZERO then i get the Type 13 error. If they are N/A or a positive number the code runs perfectly.

    Not sure why the value zero would cause any problems here?? Is there something i can modify in the code to account for this?

  6. #6
    Forum Guru Andy Pope's Avatar
    Join Date
    05-10-2004
    Location
    Essex, UK
    MS-Off Ver
    O365
    Posts
    20,436

    Re: run type error type 13

    without seeing actual data only thing to suggest is that just check contents of each array item as being valid before comparing with others.

+ 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. Replies: 0
    Last Post: 07-06-2013, 12:59 PM
  2. Run Type error 13 Type Mismatch
    By Affan Khan in forum Excel Programming / VBA / Macros
    Replies: 15
    Last Post: 11-13-2012, 12:58 PM
  3. [SOLVED] Run-type error 13 type mismatch
    By misop in forum Excel Programming / VBA / Macros
    Replies: 8
    Last Post: 06-05-2012, 04:08 AM
  4. Type Mismatch: array or user defined type expected
    By ExcelMonkey in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 07-06-2006, 10:45 AM
  5. [SOLVED] Help: Compile error: type mismatch: array or user defined type expected
    By lvcha.gouqizi in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 10-31-2005, 05:05 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