+ Reply to Thread
Results 1 to 10 of 10

Getting run-time error 13 type mismatch

  1. #1
    Forum Contributor
    Join Date
    06-29-2014
    Location
    India
    MS-Off Ver
    2010 Windows 10 64 bits
    Posts
    1,269

    Getting run-time error 13 type mismatch

    Hi friends,

    If there is a dash sign in column ‘O’ then I don’t want a duplicate message; exit sub. I’m getting run-time error 13 type mismatch.

    Please Login or Register  to view this content.
    Thank you.
    Sincerely,

    mso3

  2. #2
    Valued Forum Contributor kasan's Avatar
    Join Date
    07-22-2009
    Location
    Riga, Latvia
    MS-Off Ver
    Excel 2010
    Posts
    680

    Re: Getting run-time error 13 type mismatch

    Hi,
    I guess you get an error here:
    Please Login or Register  to view this content.
    Probably you need to do it this way:
    Please Login or Register  to view this content.

  3. #3
    Forum Contributor
    Join Date
    06-29-2014
    Location
    India
    MS-Off Ver
    2010 Windows 10 64 bits
    Posts
    1,269

    Re: Getting run-time error 13 type mismatch

    No, it's also not allowing dash sign. If there is no outward number then I want to put a dash sign which may be duplicated. I don't want to count it as duplicate value.
    [code
    If Target.Value = "-" Then Exit Sub
    [/code]

    Thanking you,

  4. #4
    Forum Guru bakerman2's Avatar
    Join Date
    10-03-2012
    Location
    Antwerp, Belgium
    MS-Off Ver
    MO Prof Plus 2016
    Posts
    6,915

    Re: Getting run-time error 13 type mismatch

    Please Login or Register  to view this content.
    The red line you need to correct because this is not correct syntax. Target.column needs to be numeric.
    Avoid using Select, Selection and Activate in your code. Use With ... End With instead.
    You can show your appreciation for those that have helped you by clicking the * at the bottom left of any of their posts.

  5. #5
    Forum Contributor
    Join Date
    06-29-2014
    Location
    India
    MS-Off Ver
    2010 Windows 10 64 bits
    Posts
    1,269

    Re: Getting run-time error 13 type mismatch

    Hi Bakerman2,
    Thank you. Same error on
    If Target.Column = "-" Then

    What change should I do to make it numeric the red lines?

    Please suggest me.

    Thank you.

  6. #6
    Forum Guru bakerman2's Avatar
    Join Date
    10-03-2012
    Location
    Antwerp, Belgium
    MS-Off Ver
    MO Prof Plus 2016
    Posts
    6,915

    Re: Getting run-time error 13 type mismatch

    Come on, you have 1210 posts so you should know by now that this "-" is an invalid syntax for addressing target column.
    Columns start from 1 to ... depending on which version of XL used.
    What exactly are you trying to achieve by using this "-" ?

  7. #7
    Forum Contributor
    Join Date
    06-29-2014
    Location
    India
    MS-Off Ver
    2010 Windows 10 64 bits
    Posts
    1,269

    Re: Getting run-time error 13 type mismatch

    Sometimes there is no outward number for an entry because it is not posted by post or courier. If the item is issued by hand then there is no outward number. In this case instead of leaving the cell blank I put a dash sign. It may repeat; which should not be treated as duplicate.

    Thank you.

  8. #8
    Forum Guru bakerman2's Avatar
    Join Date
    10-03-2012
    Location
    Antwerp, Belgium
    MS-Off Ver
    MO Prof Plus 2016
    Posts
    6,915

    Re: Getting run-time error 13 type mismatch

    This should do it.

    Please Login or Register  to view this content.

  9. #9
    Forum Contributor
    Join Date
    06-29-2014
    Location
    India
    MS-Off Ver
    2010 Windows 10 64 bits
    Posts
    1,269

    Re: Getting run-time error 13 type mismatch

    Hi Bakerman2,

    Excellent! It's working fine.

    I appreciate you for the same.

    Thank you and have a nice time.

  10. #10
    Forum Guru bakerman2's Avatar
    Join Date
    10-03-2012
    Location
    Antwerp, Belgium
    MS-Off Ver
    MO Prof Plus 2016
    Posts
    6,915

    Re: Getting run-time error 13 type mismatch

    you're welcome and thanks for rep+.

+ 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 dwiravi in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 10-25-2016, 08:36 AM
  3. run-time error '13' type mismatch
    By dp1 in forum Excel Programming / VBA / Macros
    Replies: 6
    Last Post: 09-06-2012, 02:43 AM
  4. Run-Time Error 13 'Type Mismatch'
    By Chintanpanchal in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 08-28-2012, 09:30 PM
  5. Type mismatch Run-time Error 13
    By auber in forum Excel Programming / VBA / Macros
    Replies: 9
    Last Post: 11-27-2009, 10:46 AM
  6. run-time error 13 type mismatch
    By godster84 in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 12-27-2007, 11:29 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