+ Reply to Thread
Results 1 to 4 of 4

VBA Error 13 Mismatch Error on Vlookup

  1. #1
    Registered User
    Join Date
    10-05-2019
    Location
    Philippines
    MS-Off Ver
    2016
    Posts
    8

    Exclamation VBA Error 13 Mismatch Error on Vlookup

    3333.PNG

    222.PNG
    Hi guys I keep on getting the error 13 Mismatch.

    Everything is fine but after I click the Process button the error was shown. any help on eliminating the error 13?

    Here's The code. Thanks
    Please Login or Register  to view this content.

  2. #2
    Valued Forum Contributor
    Join Date
    12-14-2011
    Location
    Vietnam
    MS-Off Ver
    Excel 2007
    Posts
    436

    Re: VBA Error 13 Mismatch Error on Vlookup

    Try replace that line by this line:
    Please Login or Register  to view this content.

  3. #3
    Forum Guru
    Join Date
    01-23-2013
    Location
    USA
    MS-Off Ver
    Microsoft 365 aka Office 365
    Posts
    3,859

    Re: VBA Error 13 Mismatch Error on Vlookup

    Hi,

    You need some defensive programming. Try code like the following:
    Please Login or Register  to view this content.
    Comments:
    a. The use of 'Integer' is archaic (but not wrong) and should probably be replaced by 'long' which stands for 'long integer'. The internal representation in Excel is of type 'long' anyway.
    b. To prevent typos from ruining days and weeks of work 'Option Explicit' is NEEDED at the top of each code module. This prevents errors caused by missspellings and FORCES every variable to be DECLARED (e.g. Dim i as Integer). https://www.excel-easy.com/vba/examp...-explicit.html

    Lewis

  4. #4
    Registered User
    Join Date
    10-05-2019
    Location
    Philippines
    MS-Off Ver
    2016
    Posts
    8

    Re: VBA Error 13 Mismatch Error on Vlookup

    Thanks guys all of this works I will close this thread now.!

+ 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 on VBA VLOOKUP
    By pongmeister in forum Excel Formulas & Functions
    Replies: 0
    Last Post: 03-15-2018, 12:34 PM
  2. [SOLVED] RowSource using Vlookup in VBA resulted Type Mismatch Error
    By archerrc in forum Excel Programming / VBA / Macros
    Replies: 10
    Last Post: 03-04-2013, 07:03 PM
  3. [SOLVED] Getting ‘Type mismatch’ error using Vlookup in VBA code
    By maacmaac in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 09-20-2012, 11:22 AM
  4. Complile Error: Type Mismatch ??? After adding error trap
    By clemsoncooz in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 02-22-2012, 03:50 PM
  5. VLookup Run-time Error 13 Type Mismatch
    By KeillRandor in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 12-17-2009, 08:24 AM
  6. Application.Vlookup Type Mismatch Error
    By ssjody in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 08-02-2006, 05:24 PM
  7. vlookup type mismatch error
    By Lilivati in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 07-13-2006, 03:35 AM

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