+ Reply to Thread
Results 1 to 4 of 4

VLOOKUP not working

  1. #1
    Registered User
    Join Date
    09-29-2010
    Location
    California
    MS-Off Ver
    Excel 2007
    Posts
    91

    VLOOKUP not working

    I have attached a file which has two spreadsheets. I have data in 'Sheet1', which needs to be lookedup in 'Sheet2'. The field 'Rate' in sheet 1 has be filled up by looking up values of the field 'Cur.Value' in sheet 2.

    I wrote a VLOOKUP function which gives me '#REF' error. Kindly help. I have attached the file with the VLOOKUP function associated.

    Thanks.
    Attached Files Attached Files

  2. #2
    Forum Guru
    Join Date
    08-05-2004
    Location
    NJ
    MS-Off Ver
    365
    Posts
    13,582

    Re: VLOOKUP not working

    The column returned is relative to the columns of your range. Since your range is D2:E15, Column 1 is D and 2 is E, you want to return column 2 so modify your formula as follows;

    =VLOOKUP(F2,Sheet2!D2:E15,2,FALSE)

    Also, you want your range to remain constant when you drag your formula so lock the cell references in place with $ like so
    =VLOOKUP(F2,Sheet2!$D$2:$E$15,2,FALSE)
    You'll get #N/A when there is no match so I'd also add an IF statement like so
    IF(ISERROR(VLOOKUP(F2,Sheet2!$D$2:$E$15,2,FALSE)),"No Match", VLOOKUP(F2,Sheet2!$D$2:$E$15,2,FALSE))
    Hope that helps.
    ChemistB
    My 2?

    substitute commas with semi-colons if your region settings requires
    Don't forget to mark threads as "Solved" (Edit First post>Advanced>Change Prefix)
    If I helped, Don't forget to add to my reputation (click on the little star at bottom of this post)

    Forum Rules: How to use code tags, mark a thread solved, and keep yourself out of trouble

  3. #3
    Registered User
    Join Date
    09-29-2010
    Location
    California
    MS-Off Ver
    Excel 2007
    Posts
    91

    Re: VLOOKUP not working

    awesome. Thank you so much. That works.

    Now that I have the pivot working properly, is it possible that instead of displaying the corresponding value, I could get it to mutiply the corresponding value with another value and display just the result?

  4. #4
    Forum Guru
    Join Date
    08-05-2004
    Location
    NJ
    MS-Off Ver
    365
    Posts
    13,582

    Re: VLOOKUP not working

    Are we talking about a different issue (a pivot table)? or the VLOOKUP. With the VLOOKUP, you can multiply the result right within your formula.

    =VLOOKUP(F2,Sheet2!$D$2:$E$15,2,FALSE)*0.6
    or
    =VLOOKUP(F2,Sheet2!$D$2:$E$15,2,FALSE) * F2 (cell will change when formula dragged)
    or
    =VLOOKUP(F2,Sheet2!$D$2:$E$15,2,FALSE) * $F$2 (cell is constant)
    Is that what you are looking for?

+ 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