+ Reply to Thread
Results 1 to 4 of 4

If two adjacent cells in the same row are the same in tab2, return third cell value

  1. #1
    Registered User
    Join Date
    02-04-2013
    Location
    amsterdam
    MS-Off Ver
    Excel 2007
    Posts
    2

    If two adjacent cells in the same row are the same in tab2, return third cell value

    Hi all,

    I am trying to match the klant (column F) and bestemming (column G) in tab 1 with the values in tab "tabel". if they match the same values in the same row, I want the contract number in tab "tabel" being returned to tab 1 (tab ma). I though I could use vlookup, but it di dnot work.

    Please see attachment for more details.

  2. #2
    Forum Guru TMS's Avatar
    Join Date
    07-15-2010
    Location
    The Great City of Manchester, NW England ;-)
    MS-Off Ver
    MSO 2007,2010,365
    Posts
    49,657

    Re: If two adjacent cells in the same row are the same in tab2, return third cell value

    One way is with an Array function:

    =INDEX('Tabel '!C:C,MATCH(F3&G3,'Tabel '!A:A&'Tabel '!B:B,0))

    committed with Ctrl-Shift-Enter rather than just Enter.


    Regards, TMS
    Trevor Shuttleworth - Retired Excel/VBA Consultant

    I dream of a better world where chickens can cross the road without having their motives questioned

    'Being unapologetic means never having to say you're sorry' John Cooper Clarke


  3. #3
    Registered User
    Join Date
    02-04-2013
    Location
    amsterdam
    MS-Off Ver
    Excel 2007
    Posts
    2

    Re: If two adjacent cells in the same row are the same in tab2, return third cell value

    Hi TMS, thanks.

    I tried the formula, and pasted it onto cell H3 in tab ma, but received a message saying that the formula contains an error.

    Is tehre a way to fix this issue?

    Thanks and regards,

    EDA

  4. #4
    Forum Guru TMS's Avatar
    Join Date
    07-15-2010
    Location
    The Great City of Manchester, NW England ;-)
    MS-Off Ver
    MSO 2007,2010,365
    Posts
    49,657

    Re: If two adjacent cells in the same row are the same in tab2, return third cell value

    If the error is #VALUE!, you have just pressed Enter to commit the formula rather than using Ctrl-Shift-Enter as advised above.

    If the formula has been entered correctly, you will see curly brackets at the beginning and end:
    {=INDEX('Tabel '!C:C,MATCH(F3&G3,'Tabel '!A:A&'Tabel '!B:B,0))}

    If the Error is #N/A, then the data you are looking up is not present.

    Other than that, you may need to change the commas (,) into semi-colons ( for your Regional Settings ... mine are UK English.

    You can test the formula by copying the values you are searching for to the tabel sheet and adding a (test) contract number, or vice versa ... copy data from the tabel sheet into the ma sheet and then use the formula.


    Regards, TMS

+ 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