+ Reply to Thread
Results 1 to 2 of 2

run-time error 13 type mismatch

  1. #1
    Registered User
    Join Date
    12-27-2007
    Posts
    2

    run-time error 13 type mismatch

    Can anyone help me on this code... i keep getting run-time error 13 type mismatch on pos = InStr(1, Cells(i, 1).Value, "Mismatch", 1). i try many ways to do it but still get the error msg. This piece of code is checking for mismatch word and count for many mismatch the program can find in each cell

    Please Login or Register  to view this content.
    Last edited by Leith Ross; 12-27-2007 at 11:16 PM.

  2. #2
    Forum Moderator Leith Ross's Avatar
    Join Date
    01-15-2005
    Location
    San Francisco, Ca
    MS-Off Ver
    2000, 2003, & 2010
    Posts
    23,258
    Hello godster84,

    Welcome to the forum! Rows and Columns are are Long integer types and you should dimension them that way. Also, when a function, like Instr, requires a string variable, use the Text method the Range rather than the Value.

    Macro with Changes
    Please Login or Register  to view this content.
    Please be considerate of other posters and the read the Forum rules for posting. You can do so by clicking Here.

    How to wrap your Code
    On the Message window Toolbar you will see the # icon. This will automatically wrap the text you selected with the proper HTML tags to create a Code Window in your post. You can do this manually by placing the tag [code]Please [url=https://www.excelforum.com/login.php]Login or Register [/url] to view this content.[/code] at the end.

    Failure to follow these rules can result in your post being locked, or deleted. If your post is locked, it will be unlocked when you contact the moderator who locked it by Private Message (PM). You must agree to the rules before the moderator will unlock it.

    The rules are designed to provide the best possible environment in which to share information. Posting, when done correctly, makes it easier for other members and guests to quickly find answers to questions, and gain insight into solving problems. Descriptive titles and using code tags are key to making posts easy to find and read.

    Sincerely,
    Leith Ross

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

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