+ Reply to Thread
Results 1 to 7 of 7

Vlookup issue

  1. #1
    Registered User
    Join Date
    04-28-2011
    Location
    St. Louis
    MS-Off Ver
    Excel 2007
    Posts
    21

    Vlookup issue

    My vlookup skills have left me this evening...I know I'm close!

    I've got a 5 column spreadsheet (example attached).

    I'd like to compare the value in Column B with those in Column D and if there's a match, write the value from Column E into Column C.
    - Narrative: If the value in B2 appears anywhere in the range D2:D7, write the company name in C2.
    - Example: Value in B2 appears in D7, Name of company in E7 should be written in C2.

    I'm using the following: =VLOOKUP(B2,$D$2:$D$7,5,FALSE) in Column C but keep getting #N/A or #REF.

    Any help is appreciated!
    Attached Files Attached Files
    Last edited by BusyEvent; 02-02-2012 at 02:27 AM. Reason: Because this is now solved! Thanks everyone that replied.

  2. #2
    Forum Guru MarvinP's Avatar
    Join Date
    07-23-2010
    Location
    Woodinville, WA
    MS-Off Ver
    Office 365
    Posts
    16,168

    Re: Vlookup - Aaaaargggh, I know I'm close!

    In C2 put
    =VLOOKUP(B2,$D$2:$E$7,2,FALSE)
    and pull down.

    You were close!!
    One test is worth a thousand opinions.
    Click the * Add Reputation below to say thanks.

  3. #3
    Registered User
    Join Date
    04-28-2011
    Location
    St. Louis
    MS-Off Ver
    Excel 2007
    Posts
    21

    Re: Vlookup - Aaaaargggh, I know I'm close!

    Quote Originally Posted by MarvinP View Post
    In C2 put
    =VLOOKUP(B2,$D$2:$E$7,2,FALSE)
    and pull down.

    You were close!!
    Ahaha...that's it...works perfectly, thanks!

    Not sure I understand why the argument is '2' rather than '5'? The company name is in E (5th column)...or is it because the desired value is in the 2nd column of the range D2:E7?

    Thanks so much!!!

  4. #4
    Forum Expert
    Join Date
    12-03-2009
    Location
    Florence, Italy
    MS-Off Ver
    Excel 2019
    Posts
    1,796

    Re: Vlookup - Aaaaargggh, I know I'm close!

    Hi,

    just change the third argument 5 into 2 in order to obtain correspondences from the second column of the range (D).

    If you'd need, the following formula if does not find an exact match writes nothing instead of #N/A

    Please Login or Register  to view this content.
    Regards
    -----------------------------------------------------

    At Excelforum, you can say "Thank you!" by clicking the star icon ("Add Reputation") below the post.

    Please, mark your thread [SOLVED] if you received your answer.

  5. #5
    Registered User
    Join Date
    04-28-2011
    Location
    St. Louis
    MS-Off Ver
    Excel 2007
    Posts
    21

    Re: Vlookup - Aaaaargggh, I know I'm close!

    I'm sure it's obvious but darned if I can find it...how do I mark this as solved?

  6. #6
    Forum Expert Paul's Avatar
    Join Date
    02-05-2007
    Location
    Wisconsin
    MS-Off Ver
    2016/365
    Posts
    6,885

    Re: Vlookup - Aaaaargggh, I know I'm close!

    How to mark a thread Solved
    Go to the first post in this thread
    Click Edit
    Click Go Advanced
    Just below the word Title you will see a drop-down with the word No prefix.
    Change to Solved
    Click Save

  7. #7
    Registered User
    Join Date
    04-28-2011
    Location
    St. Louis
    MS-Off Ver
    Excel 2007
    Posts
    21

    Re: Vlookup issue

    OK, well, not exactly the most obvious but I'll know from here on out.

    Thanks!

+ 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