+ Reply to Thread
Results 1 to 11 of 11

VLOOKUP Error

  1. #1
    Registered User
    Join Date
    12-07-2009
    Location
    UTAH
    MS-Off Ver
    Excel 2007
    Posts
    14

    VLOOKUP Error

    My dilemma: I have thousands of devices that only have one accurate way of telling me which make/model they are. Unfortunately, the prefix in each device # varies in length. Any way to manipulate the VLOOKUP function so that it will only look up the prefix to the actual number? Or is there another way that someone knows to help me categorize the devices?

    Attached is an example of just 7 devices with their make/model specified. I did those manually, obviously. But I can't do that for thousands of devices...

    Thanks in advance,
    Alan
    Attached Files Attached Files
    Last edited by AlanH; 12-08-2009 at 06:36 PM.

  2. #2
    Valued Forum Contributor khamilton's Avatar
    Join Date
    10-08-2009
    Location
    IL
    MS-Off Ver
    Excel 2007
    Posts
    345

    Re: Which function to use?

    Maybe something like this>
    AlanH.xlsx
    Please acknowledge the response you receive, good or bad. If your problem is solved, please say so clearly, and mark your thread as Solved: Click the Edit button on your first post in the thread, Click Go Advanced, select [SOLVED] from the Prefix dropdown, then click Save Changes. If more than two days have elapsed, the Edit button will not appear -- ask a moderator to mark it.

  3. #3
    Forum Expert martindwilson's Avatar
    Join Date
    06-23-2007
    Location
    London,England
    MS-Off Ver
    office 97 ,2007
    Posts
    19,320

    Re: Which function to use?

    =VLOOKUP("31e*",$A$1:$B$7,2,FALSE) or
    =VLOOKUP(d1&"*",$A$1:$B$7,2,FALSE) where d1 contains 31e
    Last edited by martindwilson; 12-08-2009 at 05:18 PM.
    "Unless otherwise stated all my comments are directed at OP"

    Mojito connoisseur and now happily retired
    where does code go ?
    look here
    how to insert code

    how to enter array formula

    why use -- in sumproduct
    recommended reading
    wiki Mojito

    how to say no convincingly

    most important thing you need
    Martin Wilson: SPV
    and RSMBC

  4. #4
    Forum Expert NBVC's Avatar
    Join Date
    12-06-2006
    Location
    Mississauga, CANADA
    MS-Off Ver
    2003:2010
    Posts
    34,898

    Re: Which function to use?

    Your post does not comply with Rule 1 of our Forum RULES. Your post title should accurately and concisely describe your problem, not your anticipated solution. Use terms appropriate to a Google search. Poor thread titles, like Please Help, Urgent, Need Help, Formula Problem, Code Problem, and Need Advice will be addressed according to the OP's experience in the forum: If you have less than 10 posts, expect (and respond to) a request to change your thread title. If you have 10 or more posts, expect your post to be locked, so you can start a new thread with an appropriate title.
    To change a Title on your post, click EDIT then Go Advanced and change your title, if 2 days have passed ask a moderator to do it for you.
    Where there is a will there are many ways.

    If you are happy with the results, please add to the contributor's reputation by clicking the reputation icon (star icon) below left corner

    Please also mark the thread as Solved once it is solved. Check the FAQ's to see how.

  5. #5
    Registered User
    Join Date
    12-07-2009
    Location
    UTAH
    MS-Off Ver
    Excel 2007
    Posts
    14

    Re: Which function to use?

    Quote Originally Posted by khamilton View Post
    Maybe something like this>
    Attachment 59739
    That spreadsheet was actually returning the wrong results. A "343" device for example was saying it was a "TP I."

    Attached is a spreadsheet which better shows my dillema.

    Thanks again,
    Alan
    Attached Files Attached Files

  6. #6
    Valued Forum Contributor khamilton's Avatar
    Join Date
    10-08-2009
    Location
    IL
    MS-Off Ver
    Excel 2007
    Posts
    345

    Re: VLOOKUP Giving Error

    I think this is working correctly>
    AlanH.xlsx

  7. #7
    Registered User
    Join Date
    12-07-2009
    Location
    UTAH
    MS-Off Ver
    Excel 2007
    Posts
    14

    Re: VLOOKUP Giving Error

    Quote Originally Posted by khamilton View Post
    I think this is working correctly>
    Attachment 59747
    Wow, cool stuff. Looks to be working for me as well.

    Thanks again for your help!

    -Alan

  8. #8
    Valued Forum Contributor khamilton's Avatar
    Join Date
    10-08-2009
    Location
    IL
    MS-Off Ver
    Excel 2007
    Posts
    345

    Re: VLOOKUP Giving Error

    Your Welcome!

  9. #9
    Registered User
    Join Date
    12-07-2009
    Location
    UTAH
    MS-Off Ver
    Excel 2007
    Posts
    14

    Re: VLOOKUP Giving Error

    Quote Originally Posted by khamilton View Post
    Your Welcome!
    I actually have a quick question about the formula if you wouldn't mind answering real quick:

    =LOOKUP(2^15,SEARCH($F$2:$F$6,A2),$G$2:$G$6)

    What does "2^15" do exactly? I put in "2^3" and it returned the same results?

  10. #10
    Valued Forum Contributor khamilton's Avatar
    Join Date
    10-08-2009
    Location
    IL
    MS-Off Ver
    Excel 2007
    Posts
    345

    Re: VLOOKUP Giving Error

    The 2^15 is one more number than the maximum number of characters allowed in a cell.

  11. #11
    Registered User
    Join Date
    12-07-2009
    Location
    UTAH
    MS-Off Ver
    Excel 2007
    Posts
    14

    Re: VLOOKUP Error

    Right on.

    I should note that I added one thing to the formula (in bold):

    =LOOKUP(2^6,SEARCH(Sheet5!$A$2:$A$6,LEFT(A66,5)),Sheet5!$B$2:$B$6)

    If I didn't make it look up only the left 5 characters, it was actually going through the whole device number and if a 27 device had 34 in it, it would actually return the model as a TP II and not a CLASSIC.

    Figured I would throw that in there!

    Thanks again,
    Alan

+ 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