+ Reply to Thread
Results 1 to 9 of 9

Vlookup not working as letters and numbers

  1. #1
    Forum Contributor
    Join Date
    02-24-2013
    Location
    Dubai, UAE
    MS-Off Ver
    Excel 2013
    Posts
    113

    Vlookup not working as letters and numbers

    Hi All, I am using the following code

    Please Login or Register  to view this content.
    This works for other lookups so I know the code is correct. The details which we are looking up have letters and number (when changed to just numbers the code works).

    How can I get around this problem?

    Thanks

  2. #2
    Forum Guru TMS's Avatar
    Join Date
    07-15-2010
    Location
    The Great City of Manchester, NW England ;-)
    MS-Off Ver
    MSO 2007,2010,365
    Posts
    44,366

    Re: Vlookup not working as letters and numbers

    Providing feedback to a contributor when they have addressed and resolved your problem is common courtesy.

    Perhaps, when you start doing that, there will be more willingness to answer follow up threads such as this.

    Regards, TMS
    Trevor Shuttleworth - Retired Excel/VBA Consultant

    I dream of a better world where chickens can cross the road without having their motives questioned

    'Being unapologetic means never having to say you're sorry' John Cooper Clarke


  3. #3
    Forum Expert
    Join Date
    11-26-2013
    Location
    Colac, Victoria, Australia
    MS-Off Ver
    Excel 2016
    Posts
    1,309

    Re: Vlookup not working as letters and numbers

    Hi Katie,

    The code you are using will only work with numbers. CLNG is used to to convert a value into a long integer, and the .Value also implies that you only want to deal with a number. Try getting rid of those bits of code that imply that Vres is a number.

    Please Login or Register  to view this content.

    I hope this helps, please let me know!

    Regards,

    David

    Please remember, your request is clearer if you attach a sample workbook.
    - Click on Go Advanced and click on the Paper Clip.

    If this has been of assistance, please advise. A little thanks goes a long way.
    - Please click on the *Add Reputation button at the bottom of helpful responses.

    Please mark your thread as SOLVED:
    - Click Thread Tools above your first post, select "Mark your thread as Solved".

    If several people have responded, when you reply please make it clear WHO you are responding
    to by mentioning their name.
    Last edited by JBeaucaire; 09-21-2014 at 09:19 PM. Reason: Added missing CODE tags. Please read and follow the Forum Rules, link above in the menu bar. Thanks.

  4. #4
    Forum Contributor
    Join Date
    02-24-2013
    Location
    Dubai, UAE
    MS-Off Ver
    Excel 2013
    Posts
    113

    Re: Vlookup not working as letters and numbers

    Thank you so much David, that has worked perfectly now. Please let me know how to leave feedback for you help on this thread.

    Thanks

    Katie

  5. #5
    Forum Guru TMS's Avatar
    Join Date
    07-15-2010
    Location
    The Great City of Manchester, NW England ;-)
    MS-Off Ver
    MSO 2007,2010,365
    Posts
    44,366

    Re: Vlookup not working as letters and numbers

    @katieshields: Katie, Katie, Katie: I'm shocked. And hurt. No, not really. But a little disappointed. And there I was, thinking we were getting on so well ...

    Seems you have already found various ways of providing feedback. Though posting negative rep is not the best way to win friends and influence people on a free forum, especially posting negative rep to someone who has answered two previous posts of yours. Sadly, those posts didn't warrant a thank you, nor the positive rep that they might have deserved.

    And hiding behind a PM ...

    PM: Unnecessary post: Not a response to my thread and surely a private message would have been more appropriate but I will accept it anyway. As you may be able to see I don't often post on here so if you would like to explain where I can leave feedback rather than posting petty comments I will be more than happy to do this.
    Please don't try to turn your lack of courtesy into my bad. You could have just as easily gone back to the two threads that I answered, said thank you and marked them solved and we could all have been happy. Given that you posted my code back on the forum without credit, I guess you were too embarrassed to follow it up with me?

    And I did explain where and how to provide feedback when I suggested you mark those threads solved. I welcome positive rep, though a simple thank you would have been enough. No response at all is, well, no response at all.

    With around 100 posts, you can hardly be classed as an infrequent user. So you could/should be expected to know the rules ...

    6a. Feedback Rule:
    Be responsive - provide feedback to suggested solutions and take the time to thank those who took their time to help you
    If you solve a problem yourself before anyone else has responded, post your solution to complete the thread.
    Never edit a thread or post to which others have already responded
    Advice and well-intended recommendations from all users are welcome. Such recommendations appearing in random threads may be considered off-topic and as such may be moderated by deletion or movement to a separate thread.
    The current moderating staff will moderate. What's past is not always relevant to current moderation needs or decisions. Moderators too are just people. When perceived errors occur point them out politely via private message or the REPORT feature.
    Serious concerns should be brought to the moderation team privately or in the Water Cooler in threads for that purpose.

    6b. Common courtesy is required in all posts public/private, at all times.
    Courteous discourse will be expected at all times
    Avoid coarse language (meaning any words you wouldn't hear in Sunday school)
    User names that are deemed offensive or in poor taste are subject to being changed or banned pending discussion between the forum leaders and the user in question.
    All advice/complaints will be evaluated in the spirit in which they are sent. Keep that in mind. A vicious delivery may result in possibly good suggestions being ignored. Don't be the cause of that.
    No matter how angry or upset you may be over any issue, courteous discourse will be expected at all times
    Sarcasm is fun but dangerous in text form. Use it with wisdom.

    Good to see that you have thanked David for his response. See how easy that was?

    I wish you well with any future posts.

    Regards, TMS

  6. #6
    Administrator 6StringJazzer's Avatar
    Join Date
    01-27-2010
    Location
    Tysons Corner, VA, USA
    MS-Off Ver
    MS365 Family 64-bit
    Posts
    24,696

    Re: Vlookup not working as letters and numbers

    David A Coop, although your code is only a couple of lines we do require code tags.

    Your post does not comply with Rule 3 of our Forum RULES. Use code tags around code.

    Posting code between [CODE]Please [url=https://www.excelforum.com/login.php]Login or Register [/url] to view this content.[/CODE] tags makes your code much easier to read and copy for testing, it also maintains VBA formatting.

    Highlight your code and click the # icon at the top of your post window. More information about these and other tags can be found here
    Jeff
    | | |會 |會 |會 |會 | |:| | |會 |會
    Read the rules
    Use code tags to [code]enclose your code![/code]

  7. #7
    Forum Moderator - RIP Richard Buttrey's Avatar
    Join Date
    01-14-2008
    Location
    Stockton Heath, Cheshire, UK
    MS-Off Ver
    Office 365, Excel for Windows 2010 & Excel for Mac
    Posts
    29,464

    Re: Vlookup not working as letters and numbers

    @Katieshields

    You have reported TMS's post as
    "Again, not required in the thread as not of any use to my request. Very rude user indeed!"
    I have read carefully through the various recent posts by you and TMS and my understanding is that TMS had offered you solutions and in each thread had gone on to mention that the rules mention thanking people who have helped you.

    Reading between the lines I'm assuming, but correct me if I'm wrong that you chose not to offer any thanks. That's your decision of course. TMS then seems to have responded to a further post of yours suggesting that you are likely to receive responses if as a matter of courtesy (the words used in the rules) you were to adopt this practice.

    So, assuming the above is essentially correct I can see nothing in TMS's words that would lead a reasonable person to think that there are any rude comments (your description). In addition the advice to offer thanks is I believe relevant in this case since it explains why you are more likely to receive help, and therefore is 'of use to your request'.

    Consequently, I can see no justification whatsoever for you reporting the TMS post and I will not be taking any action. Furthermore I understand that you chose to use the PM facility to contact TMS. The PM facility is not there for this sort of thing, something you should know since you are not a newbie.

    My advice is to heed the advice you've been given.
    Richard Buttrey

    RIP - d. 06/10/2022

    If any of the responses have helped then please consider rating them by clicking the small star icon below the post.

  8. #8
    Forum Guru TMS's Avatar
    Join Date
    07-15-2010
    Location
    The Great City of Manchester, NW England ;-)
    MS-Off Ver
    MSO 2007,2010,365
    Posts
    44,366

    Re: Vlookup not working as letters and numbers

    Thanks Richard.

    For completeness, the threads are:

    Lookup on user form isn't working

    and:

    How to auto generate a number in user form

    In both cases, I answered the question in less than an hour. Some time (hours) later, I posted the "standard" message explaining how to mark a thread solved ... and, if the user so wished, how to thank the contributor(s).

    In this thread, I was referring back to those two threads which, as you can see, received no further input from the OP.

    Interesting that she should report the thread



    Regards, TMS

  9. #9
    Forum Expert JBeaucaire's Avatar
    Join Date
    03-21-2004
    Location
    Bakersfield, CA
    MS-Off Ver
    2010, 2016, Office 365
    Posts
    33,492

    Re: Vlookup not working as letters and numbers

    All,

    @Katie - when other members of the forum offer advice for free, take it. Make absolutely certain they aren't correct before you ignore any advice, even if you take offense at the delivery in some manner. TEXT always reads harsher than the exact same words spoken softly to you in person would sound. Try reading them again with a soft-tone overlay and perhaps the offense is not there.

    When someone does speak to you in a manner that is discourteous, use the REPORT option, as you've already found and used. That's what it's for. But it's not discourteous to be reminded of the rules, so go gentle with that option as well.

    Once you have Reported, be sure to leave it be. The moderators will consider the report and rule, you are best to remain focused on the topic at hand within the thread. And be sure to post feedback IN the thread so all know a solution has been useful. You can also use REPUTATION link under anyone's post to say "thank you" directly.

    ----------
    Richard is correct, there is nothing rude in this thread, though the resulting speeches by our team are possibly better suited for Private Messages, maybe? Food for thought all.

    Negative rep will be removed as it is inappropriate.

    No more off topic discussion will be needed. Thanks all.
    _________________
    Microsoft MVP 2010 - Excel
    Visit: Jerry Beaucaire's Excel Files & Macros

    If you've been given good help, use the icon below to give reputation feedback, it is appreciated.
    Always put your code between code tags. [CODE] your code here [/CODE]

    ?None of us is as good as all of us? - Ray Kroc
    ?Actually, I *am* a rocket scientist.? - JB (little ones count!)

+ 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. VLookup on numbers and letters
    By cleetus in forum Excel Formulas & Functions
    Replies: 1
    Last Post: 01-09-2013, 01:36 PM
  2. 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
  3. Vlookup issue for column with numbers and letters
    By hk106 in forum Excel General
    Replies: 4
    Last Post: 12-01-2011, 03:59 PM
  4. VLOOKUP with Numbers AND Letters
    By dkgolfer39 in forum Excel General
    Replies: 6
    Last Post: 07-23-2010, 01:05 PM
  5. [SOLVED] VLOOKUP for a cell with both letters and numbers
    By Sonohal in forum Excel General
    Replies: 7
    Last Post: 04-08-2005, 10:06 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