+ Reply to Thread
Results 1 to 10 of 10

Help with basic VLOOKUP

  1. #1
    Registered User
    Join Date
    07-18-2019
    Location
    Chicago
    MS-Off Ver
    365
    Posts
    41

    Help with basic VLOOKUP

    Please see attached, sheet 'Actions'

    I need to do lookups in K2 and L2 (looking up values from 'Data')

    A. Note K2 is literally displaying the function. Why is that?

    B. In L2, the value is 0 -- it should lookup the Role value in Data G13.


    I'm overlooking something simple, I'm sure.

    Thank you.,
    Attached Files Attached Files

  2. #2
    Forum Expert avk's Avatar
    Join Date
    07-12-2007
    Location
    India
    MS-Off Ver
    Microsoft Office 2013
    Posts
    3,223

    Re: Help with basic VLOOKUP

    Firstly change format as General
    Formula: copy to clipboard
    Please Login or Register  to view this content.


    atul


    If my answer (or that of other members) has helped you, please say "Thanks" by clicking the Add Reputation button at the foot of one of their posts.

    Also: if your problem is solved, please take the time to mark your thread as SOLVED by going to the top of your first post, selecting "Thread Tools" and then "Mark thread as solved".

  3. #3
    Forum Contributor
    Join Date
    09-24-2009
    Location
    london
    MS-Off Ver
    Excel 2013
    Posts
    129

    Re: Help with basic VLOOKUP

    A. The cell formatting is "text". change to "General", double click within the cell and press "enter".
    B. Also change the formatting to "General". try using this formula.
    Formula: copy to clipboard
    Please Login or Register  to view this content.

  4. #4
    Registered User
    Join Date
    07-18-2019
    Location
    Chicago
    MS-Off Ver
    365
    Posts
    41

    Re: Help with basic VLOOKUP

    Getting there.

    So, using this > =VLOOKUP(J2,Data!C5:G25,5,FALSE) < which does work...

    If I copy that cell, highlight the cells below it and paste ...

    I noticed the forumula changes. The Data!C5:G25 does not stay consistent. Instead I see this:

    =IFERROR(VLOOKUP(J2,Data!C5:G25,3,FALSE),"")
    =IFERROR(VLOOKUP(J3,Data!C6:G26,3,FALSE),"")
    =IFERROR(VLOOKUP(J4,Data!C7:G27,3,FALSE),"")

    etc., etc.

    Ideas? I have not seen this before when copying formulas. Thanks again.

  5. #5
    Forum Moderator AliGW's Avatar
    Join Date
    08-10-2013
    Location
    Retired in Ipswich, Suffolk, but grew up in Sawley, Derbyshire (England)
    MS-Off Ver
    MS 365 Subscription Insider Beta Channel v. 2405 (Windows 11 23H2 64-bit)
    Posts
    81,421

    Re: Help with basic VLOOKUP

    You need to fix the arrays as absolute before copying down:

    =VLOOKUP(J2,Data!$C$5:$G$25,5,FALSE)
    Ali


    Enthusiastic self-taught user of MS Excel who's always learning!
    Don't forget to say "thank you" in your thread to anyone who has offered you help.
    You can reward them by clicking on * Add Reputation below their user name on the left, if you wish.

    Forum Rules (updated August 2023): please read them here.

  6. #6
    Forum Guru
    Join Date
    09-10-2017
    Location
    Chippenham, England
    MS-Off Ver
    365
    Posts
    15,110

    Re: Help with basic VLOOKUP

    Try
    Formula: copy to clipboard
    Please Login or Register  to view this content.

  7. #7
    Registered User
    Join Date
    07-18-2019
    Location
    Chicago
    MS-Off Ver
    365
    Posts
    41

    Re: Help with basic VLOOKUP

    Success! Thank you.

    And something I just noticed. In Actions L column, the lookup displays a 0 if there is no value in the Data table.
    Why is that? Thank you.
    Attached Files Attached Files

  8. #8
    Forum Guru
    Join Date
    09-10-2017
    Location
    Chippenham, England
    MS-Off Ver
    365
    Posts
    15,110

    Re: Help with basic VLOOKUP

    That's just how it works. If it finds the J2 value then it has to return something, so if the column you are retrieving the value from is empty it will return 0.
    You can either test for that & return "" or hide the 0 values

  9. #9
    Registered User
    Join Date
    07-18-2019
    Location
    Chicago
    MS-Off Ver
    365
    Posts
    41

    Re: Help with basic VLOOKUP

    Conditional Formatting might be the best way?

  10. #10
    Forum Guru
    Join Date
    09-10-2017
    Location
    Chippenham, England
    MS-Off Ver
    365
    Posts
    15,110

    Re: Help with basic VLOOKUP

    Yes, you could use Cf to "hide" the 0 values by changing the font colour to match the fill colour.

+ 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] basic vlookup help
    By jaffacakes in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 09-17-2015, 09:01 PM
  2. VLOOKUP Visual basic
    By Mart Marti in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 05-22-2015, 04:08 PM
  3. Basic VLookup Question
    By KerryFreeman in forum Excel Formulas & Functions
    Replies: 5
    Last Post: 02-05-2014, 08:37 PM
  4. Basic Vlookup Help
    By Centexcel in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 02-25-2013, 12:33 AM
  5. Basic Vlookup
    By Skiman in forum Excel General
    Replies: 14
    Last Post: 03-08-2012, 01:28 AM
  6. Basic Vlookup Help
    By VegasL in forum Excel General
    Replies: 2
    Last Post: 09-10-2008, 02:33 PM
  7. Basic VLOOKUP Help
    By patd7260 in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 01-07-2006, 04:10 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