+ Reply to Thread
Results 1 to 4 of 4

Vlookup or not

  1. #1
    Registered User
    Join Date
    03-12-2012
    Location
    Rock Hill, SC
    MS-Off Ver
    Excel 2007
    Posts
    4

    Vlookup or not

    I need Excel to return the value column D from Sheet1 when the values of columns B and C on both worksheets match.
    I have manually entered the values in D4 and D5 to show what I am after.

    Thank you for all your help
    Attached Files Attached Files
    Last edited by GregM40; 03-13-2012 at 02:49 PM.

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

    Re: Vlookup or not

    Most efficient way is with a dummy column on sheet1. In column A of sheet1, in A4 = B4&C4 copied all the way down. (You can hide this column if you wish)
    Then in Sheet2, you can use this formula

    =IFERROR(VLOOKUP(B4&C4,Sheet1!$A$4:$E$7142,4,FALSE),"")
    Does that work for you?

    You can also use array formulas and then you don't need the dummy column. However, depending on the amount of data you have, this might slow down your calculations.

    For this you'd use
    =IFERROR(INDEX(Sheet1!$D$4:$D$7142,MATCH(Sheet2!B29&Sheet2!C29,Sheet1!$B$4:$B$7142&Sheet1!$C$4:$C$7142,0)),"")
    as an array (enter with CNTRL SHFT ENTER).
    Hope that helps.
    Last edited by ChemistB; 03-12-2012 at 01:41 PM.
    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
    03-12-2012
    Location
    Rock Hill, SC
    MS-Off Ver
    Excel 2007
    Posts
    4

    Re: Vlookup or not

    ChemistB,

    Thanks I was able to use the first formula you gave me. Not sure how to make the array formula to work. Where do I add the formula. I tried to add it on Sheet2 in D4 and Excel informed me that there was an error in the formula. I did enter the formula by entering it with CNTRL+SHFT+Enter.

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

    Re: Vlookup or not

    I probably confused you by copying a formula from row 29. That would be modified for row 4. Attached is your spreadsheet with formula in place.
    Attached Files Attached Files

+ 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