+ Reply to Thread
Results 1 to 10 of 10

Run-Time Error '13' Type Mismatch

  1. #1
    Forum Contributor
    Join Date
    10-11-2012
    Location
    England
    MS-Off Ver
    Excel 2010
    Posts
    358

    Run-Time Error '13' Type Mismatch

    Here' the segment of my code

    Please Login or Register  to view this content.
    Video illustrating the error: http://screencast.com/t/xCx1jOdLk

    I have everything printed and my code works until i hit one particular row...!?

    I have tested it without the part highlighted in red and no errors pop-up. So what is making this temperamental?

  2. #2
    Forum Guru Winon's Avatar
    Join Date
    02-20-2007
    Location
    East Rand, R.S.A.
    MS-Off Ver
    2010
    Posts
    6,113

    Re: Run-Time Error '13' Type Mismatch

    Hello domgilberto,

    Try:

    Please Login or Register  to view this content.
    Regards.
    Please consider:

    Be polite. Thank those who have helped you. Then Click on the star icon in the lower left part of the contributor's post and add Reputation. Cleaning up when you're done. If you are satisfied with the help you have received, then Please do Mark your thread [SOLVED] .

  3. #3
    Forum Expert
    Join Date
    02-14-2009
    Location
    .
    MS-Off Ver
    ................
    Posts
    2,840

    Re: Run-Time Error '13' Type Mismatch

    TimeSerial has limits... which row number?

  4. #4
    Forum Contributor
    Join Date
    10-11-2012
    Location
    England
    MS-Off Ver
    Excel 2010
    Posts
    358

    Re: Run-Time Error '13' Type Mismatch

    Quote Originally Posted by cytop View Post
    TimeSerial has limits... which row number?
    The MATCH should return row number 6285

  5. #5
    Forum Contributor
    Join Date
    10-11-2012
    Location
    England
    MS-Off Ver
    Excel 2010
    Posts
    358

    Re: Run-Time Error '13' Type Mismatch

    Quote Originally Posted by Winon View Post
    Hello domgilberto,

    Try:

    Please Login or Register  to view this content.
    Regards.
    Putting "z" in won't help. It actually makes it worse as I depend upon the increase in "w" to increment my date and time by 1 hour each successive loop

  6. #6
    Forum Contributor
    Join Date
    10-11-2012
    Location
    England
    MS-Off Ver
    Excel 2010
    Posts
    358

    Re: Run-Time Error '13' Type Mismatch

    What other ways can i simply add an hour to my date time... this is so annoying

  7. #7
    Forum Expert
    Join Date
    02-14-2009
    Location
    .
    MS-Off Ver
    ................
    Posts
    2,840

    Re: Run-Time Error '13' Type Mismatch

    The VBA DateAdd() function...
    Please Login or Register  to view this content.
    To add 5 hours to the date/time in the active cell.

    With 1/1/16 12:00 in the active cell, add 55 hours
    Please Login or Register  to view this content.
    Last edited by cytop; 05-21-2016 at 02:40 PM.

  8. #8
    Forum Contributor
    Join Date
    10-11-2012
    Location
    England
    MS-Off Ver
    Excel 2010
    Posts
    358

    Re: Run-Time Error '13' Type Mismatch

    Nope - doesn't help...

    Man this is killing me... Writing the MATCH in excel formula it grabs what i need... Why is it working on every row and then it bombs out on a specific row with this run-time error!

  9. #9
    Forum Expert
    Join Date
    02-14-2009
    Location
    .
    MS-Off Ver
    ................
    Posts
    2,840

    Re: Run-Time Error '13' Type Mismatch

    The function itself works - what may not work is how you use it, or the logic of what you are doing.

    Nope - doesn't help
    Really doesn't help.

  10. #10
    Forum Contributor
    Join Date
    10-11-2012
    Location
    England
    MS-Off Ver
    Excel 2010
    Posts
    358

    Re: Run-Time Error '13' Type Mismatch

    Quote Originally Posted by cytop View Post
    The function itself works - what may not work is how you use it, or the logic of what you are doing.



    Really doesn't help.

    Ok so I've been spending hours on this issue now. Basically this:

    Please Login or Register  to view this content.
    Creates a bug and the run-time error in question. If I remove the "0" argument from the Application.Match it works (but obviously this is not correct as without this it assumes a "1").

    So my theory is that my date times ("m/dd/yyyy hh:mm") is marginally incorrect and there is a precision issue going on here. E.g. the serial value this part:

    Please Login or Register  to view this content.
    Does not PRECISELY match up because of a rounding issue?

    Any ideas on how i can test this?

+ 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. [SOLVED] Run time error '13' - type mismatch
    By monkeypants in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 03-12-2016, 12:26 AM
  2. Run-Time error '13': Type mismatch
    By Stevo56 in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 05-16-2014, 11:06 AM
  3. [SOLVED] Run-time error 13 type mismatch
    By mukeshbaviskar in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 10-29-2013, 12:02 AM
  4. Run-Time Error '13: Type Mismatch
    By mlegge77 in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 07-18-2013, 04:44 PM
  5. Run time error - type mismatch
    By justinng in forum Excel Programming / VBA / Macros
    Replies: 7
    Last Post: 08-10-2009, 11:24 PM
  6. Run-time Error '13': Type mismatch
    By siamadu in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 02-13-2009, 09:58 AM
  7. 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