+ Reply to Thread
Results 1 to 11 of 11

Run Time Error 13 . Type mismatch

  1. #1
    Forum Contributor
    Join Date
    05-31-2012
    Location
    South africa
    MS-Off Ver
    Excel 2010
    Posts
    292

    Run Time Error 13 . Type mismatch

    Hi

    I have recently been having an issue with a macro that i am trying to run. Up until yesterday it ran perfectly but now it is unable to complete running. it generates a message that says "run time error 13, type mismatch". i have attached a sample of my schedule that i am trying to run the macro on. There are 31 pages with a lot more detail on the original schedule. Unfortunately i am unable to attach it here as it is too big.

    Excel Test.xlsm

    If i debug the macro the following line is highlighted:
    Please Login or Register  to view this content.
    Here is the full macro:
    Please Login or Register  to view this content.
    Thanks for your help
    Terri

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

    Re: Run Time Error 13 . Type mismatch

    I run the code and I did not get any error.

  3. #3
    Forum Contributor
    Join Date
    05-31-2012
    Location
    South africa
    MS-Off Ver
    Excel 2010
    Posts
    292

    Re: Run Time Error 13 . Type mismatch

    Quote Originally Posted by AB33 View Post
    I run the code and I did not get any error.
    Hi

    I deleted some info on the attachment and now i see that it runs. However when i try to run it on the master there is an issue. I wish I could attach the whole file.

    I will see if i can attach a bigger sample

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

    Re: Run Time Error 13 . Type mismatch

    I do not know, but I could not imagine why the code fails on this line if the condition is false, it should skip that row.

    Please Login or Register  to view this content.
    Unless there is an error on column I.

  5. #5
    Forum Contributor
    Join Date
    05-31-2012
    Location
    South africa
    MS-Off Ver
    Excel 2010
    Posts
    292

    Re: Run Time Error 13 . Type mismatch

    Hi

    I have attached a different sample here and i think i have found the issue. On sheet 26 in one of the columns my formula has generated an answer that is "value" . i have no idea why it has generated this answer. Can anyone help. if i manually fix this error it will then run.

    Thanks
    Terri




    June Sample.xlsm

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

    Re: Run Time Error 13 . Type mismatch

    you can not divide a number by zero. To cheat the error, you can change your formulas like

    Please Login or Register  to view this content.
    Last edited by AB33; 07-09-2014 at 02:42 PM.

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

    Re: Run Time Error 13 . Type mismatch

    To avoid the error, I have added an error trapping line. My guess was right. The code will error on any line if the cell has an error on it.

    Please Login or Register  to view this content.

  8. #8
    Forum Contributor
    Join Date
    05-31-2012
    Location
    South africa
    MS-Off Ver
    Excel 2010
    Posts
    292

    Re: Run Time Error 13 . Type mismatch

    Hi

    I have no idea why it created an error. If you go further done on sheet 26 there are some other rows that are similar but they did not create an "error". why would this row create an error? I will try your macro in the morning. Thanks so much for your help any way.

    Terri

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

    Re: Run Time Error 13 . Type mismatch

    In maths, you can not divide a number by zero. Well, you can, but you get an infinite number, but in a computer you get no value which is an error.

  10. #10
    Forum Contributor
    Join Date
    05-31-2012
    Location
    South africa
    MS-Off Ver
    Excel 2010
    Posts
    292

    Re: Run Time Error 13 . Type mismatch

    I understand that but i am confused as to why it did not generate the same results on rows 27,28,30 and 31 on sheet 26

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

    Re: Run Time Error 13 . Type mismatch

    If I put this formula in J27

    =ISBLANK(J27)

    it returns true, which means the cell is blank and the formula will return 0, but put the same formula in J10, you get false which means that cell is not blank

    =ISBLANK(J10)

+ 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 - Type mismatch
    By raraschek in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 04-28-2014, 12:04 PM
  2. [SOLVED] Run time error 13 - Type mismatch
    By Sc0tt1e in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 11-18-2013, 08:30 AM
  3. Run time error type mismatch 13
    By Dariusd7 in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 11-15-2013, 05:11 PM
  4. [SOLVED] Please help with Run-Time error 13 Type Mismatch
    By alec66317 in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 06-14-2012, 08:29 AM
  5. Run time error - type mismatch
    By justinng in forum Excel Programming / VBA / Macros
    Replies: 7
    Last Post: 08-10-2009, 11:24 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