+ Reply to Thread
Results 1 to 3 of 3

VLOOKUP Causing Error 13 with Macro

  1. #1
    Registered User
    Join Date
    09-11-2013
    Location
    zastron,south africa
    MS-Off Ver
    Excel 2010
    Posts
    48

    VLOOKUP Causing Error 13 with Macro

    Hi All
    I Have a Macro that determines if a cell has a value, if not, It must tell the user to add the values. All is well and it works well, but I had to add "Exit Sub" to stop the Macro from continuing because of the nature of the code that follows. Now, even if The cells are populated, the code stops at the "Exit Sub". Here is my code:

    Please Login or Register  to view this content.
    I have tied adding a "Else If" statement to try and continue the code, but it does not except it and marks the code in Red. What should I do, It's like I'm damned if I do and damned if I don't.
    At the same time, I have a columb with a VLOOKUP formula(=IFERROR(VLOOKUP(@[Columb1]PartsList!A5:I10000,2,FALSE),0)) that gives me a error on the same code If I choose to change the value of the cell, How do I get past that also? The value in the cell gets it value from another sheet depending what Item I choose, but I have a item that does not have a value so that I may enter my own value, but my code stops with a error 13. Any Help would be great.

    Thank you in advance.
    Last edited by jeffreybrown; 02-28-2020 at 03:52 PM. Reason: Please use code tags!
    Creating POS

  2. #2
    Forum Expert
    Join Date
    12-14-2012
    Location
    London England
    MS-Off Ver
    MS 365 Office Suite.
    Posts
    8,448

    Re: VLOOKUP Causing Error 13 with Macro

    You Error is two line before that.

    Please Login or Register  to view this content.
    Should be

    Please Login or Register  to view this content.
    My General Rules if you want my help. Not aimed at any person in particular:

    1. Please Make Requests not demands, none of us get paid here.

    2. Check back on your post regularly. I will not return to a post after 4 days.
    If it is not important to you then it definitely is not important to me.

  3. #3
    Registered User
    Join Date
    09-11-2013
    Location
    zastron,south africa
    MS-Off Ver
    Excel 2010
    Posts
    48

    Re: VLOOKUP Causing Error 13 with Macro

    Thank you, That solved my issue.

+ 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] Formula in Macro causing a Compile error (looking for end of statement)
    By Mustang65 in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 10-05-2018, 09:51 AM
  2. [SOLVED] Need help sorting macro that's causing an error
    By tfilipe in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 06-21-2018, 03:05 AM
  3. [SOLVED] VLOOKUP array causing error in one cell, but not another
    By LKERN in forum Excel Formulas & Functions
    Replies: 6
    Last Post: 11-09-2017, 08:38 AM
  4. Any guess on why this macro is causing a subscript out of range error?
    By 80Wil in forum Excel Programming / VBA / Macros
    Replies: 6
    Last Post: 04-21-2017, 07:07 PM
  5. VLOOKUP lookup data (possibly) causing N/A error message due to formatting?
    By Jim_Davidson in forum Excel Formulas & Functions
    Replies: 28
    Last Post: 08-05-2015, 09:36 AM
  6. [SOLVED] Date format error causing macro bug
    By Hyflex in forum Excel Programming / VBA / Macros
    Replies: 11
    Last Post: 03-09-2012, 06:38 AM
  7. VLOOKUP Formula causing an error
    By japc90 in forum Excel General
    Replies: 2
    Last Post: 07-25-2006, 06:40 PM

Tags for this Thread

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