+ Reply to Thread
Results 1 to 8 of 8

Vlookup a value from an array containing the value plus extras

  1. #1
    Forum Contributor PY_'s Avatar
    Join Date
    09-23-2008
    Location
    Houston
    MS-Off Ver
    Office 2016
    Posts
    289

    Vlookup a value from an array containing the value plus extras

    Is there a way to VLOOKP a specific value from a group of data that contains that value and some additional information?

    Example:
    I want to VLOOKUP "ABC" from Column A and return the numerical value that is located in Column B into Column C.

    Easy enough Here:

    ColA = ABC
    ColB = 1122
    ColC =
    Please Login or Register  to view this content.
    ColD = ABC



    BUT, what if i have the following information instead:

    ColA = ABC7458
    ColB = 1122
    ColC = ??
    ColD = ABC

    How can i pull the 1122 out of that using the ABC from Column D?
    Last edited by PY_; 07-15-2010 at 02:15 PM.

  2. #2
    Forum Expert snb's Avatar
    Join Date
    05-09-2010
    Location
    VBA
    MS-Off Ver
    Redhat
    Posts
    5,649

    Re: Vlookup a value from an array containing the value plus extras

    =right(VLOOKUP(A1,A:B,2,FALSE),4)

  3. #3
    Forum Expert
    Join Date
    01-12-2007
    Location
    New Jersey
    Posts
    2,127

    Re: Vlookup a value from an array containing the value plus extras

    If you the "ABC" could be anywhere in the data string, or you don't know how long the data string will be, try a formula like the following:

    Please Login or Register  to view this content.
    Let me know if it works.

  4. #4
    Forum Contributor PY_'s Avatar
    Join Date
    09-23-2008
    Location
    Houston
    MS-Off Ver
    Office 2016
    Posts
    289

    Re: Vlookup a value from an array containing the value plus extras

    Thanks for the help!

  5. #5
    Forum Contributor PY_'s Avatar
    Join Date
    09-23-2008
    Location
    Houston
    MS-Off Ver
    Office 2016
    Posts
    289

    Re: Vlookup a value from an array containing the value plus extras

    Quote Originally Posted by BigBas View Post
    If you the "ABC" could be anywhere in the data string, or you don't know how long the data string will be, try a formula like the following:

    Please Login or Register  to view this content.
    Let me know if it works.


    I do like this one, but how can i change the "ABC" from your code to the value that is in column D?

  6. #6
    Forum Expert
    Join Date
    01-12-2007
    Location
    New Jersey
    Posts
    2,127

    Re: Vlookup a value from an array containing the value plus extras

    If I understand your request correctly, you simply have to change the syntax "ABC" to the cell that contains the value, ie, D1 (note: do not use quotation marks when referencing the cell):

    Please Login or Register  to view this content.
    Let me know if that works

  7. #7
    Forum Contributor PY_'s Avatar
    Join Date
    09-23-2008
    Location
    Houston
    MS-Off Ver
    Office 2016
    Posts
    289

    Re: Vlookup a value from an array containing the value plus extras

    Your correct, it was an error on my part testing it.

  8. #8
    Forum Contributor PY_'s Avatar
    Join Date
    09-23-2008
    Location
    Houston
    MS-Off Ver
    Office 2016
    Posts
    289

    Re: Vlookup a value from an array containing the value plus extras

    I am not sure how to ask this without breaking forum rules...if this should be a new question let me know!


    Now, how would i do this?

    ColA = ABC7458
    ColB = 1122
    ColC = ??
    ColD = ABC

    How can i pull the 7458 out of ColA using the ABC from Column D?

+ 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