+ Reply to Thread
Results 1 to 4 of 4

Vlookup VBA error if string

  1. #1
    Registered User
    Join Date
    09-30-2014
    Location
    Colombia
    MS-Off Ver
    2010
    Posts
    5

    Vlookup VBA error if string

    Hi all,

    I have the attached program that when I select a number from column A then it vlooksup for values but if I change numbers for words in column A then it gives me an error. Could you help me out please
    Attached Files Attached Files

  2. #2
    Registered User
    Join Date
    09-12-2019
    Location
    Bnagladesh
    MS-Off Ver
    2013
    Posts
    41

    Re: Vlookup VBA error if string

    It may be because of this. Please check.

    Attachment 649908

  3. #3
    Forum Expert Greg M's Avatar
    Join Date
    08-16-2007
    Location
    Dublin. Ireland
    MS-Off Ver
    Office 2016
    Posts
    4,645

    Re: Vlookup VBA error if string

    Hi there,

    The error you describe occurs because the highlighted function in the following statement:

    Please Login or Register  to view this content.
    is attempting to convert a string value to a numeric value.


    See if the following version of your code does what you need:

    Please Login or Register  to view this content.

    Hope this helps - please let me know how you get on.

    Regards,

    Greg M

  4. #4
    Registered User
    Join Date
    09-12-2019
    Location
    Bnagladesh
    MS-Off Ver
    2013
    Posts
    41

    Re: Vlookup VBA error if string

    Nice Solution

+ 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] application vlookup error runtime error 1004, unable to get the vlookup property of the.."
    By dmcgov in forum Excel Programming / VBA / Macros
    Replies: 23
    Last Post: 12-05-2018, 12:03 PM
  2. [SOLVED] Passing variable in VLookup string in VBA Code- I get an error
    By rv02 in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 04-07-2016, 04:37 PM
  3. [SOLVED] Error in Vlookup string: A value used in the formula is of the wrong data type.
    By Taylorim in forum Excel Formulas & Functions
    Replies: 4
    Last Post: 02-20-2016, 08:20 AM
  4. VBA Vlookup error when searching for all numbers as a string, works fine with letters
    By thumpernc24 in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 08-23-2012, 10:06 AM
  5. VBA vlookup error depending on text string & quotation marks
    By xlcharlie in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 07-19-2006, 10:05 AM
  6. VBA vlookup error depending on text string & quotation marks
    By xlcharlie in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 07-19-2006, 09:35 AM
  7. VBA vlookup error depending on text string & quotation marks
    By xlcharlie in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 07-19-2006, 09:30 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