+ Reply to Thread
Results 1 to 5 of 5

looking at two sheets & show matching records

Hybrid View

  1. #1
    Registered User
    Join Date
    02-20-2012
    Location
    London
    MS-Off Ver
    Excel 2007
    Posts
    22

    looking at two sheets & show matching records

    Hello,

    I have attached my spreadsheet.

    In sheet 1, i have a list of fictitious schools with addresses, in sheet 2, i have a list of fictitious students with addresses

    What i require is a formula that sits in column F of sheet 2, that looks at the students 'postcode' then searches for the same postcode in the schools list in sheet 1.

    If any of the postcodes match then the name of the school, would be required to show in the column F, for that student.

    In my attached spreadsheet, the only match is 'Ben' and 'School 8' so whats required is a formula that would return 'School 8' to the cell F7 on sheet 2.

    Many Thanks in advance.
    Attached Files Attached Files

  2. #2
    Valued Forum Contributor
    Join Date
    08-14-2012
    Location
    India
    MS-Off Ver
    Excel 2007
    Posts
    573

    Re: looking at two sheets & show matching records

    Try this formula in Column F..
    Formula: copy to clipboard
    =IFERROR(INDEX(Schools!A:A,MATCH(Students.!E2,Schools!E:E,0)),"")

  3. #3
    Registered User
    Join Date
    02-20-2012
    Location
    London
    MS-Off Ver
    Excel 2007
    Posts
    22

    Re: looking at two sheets & show matching records

    Many Thanks for the response, formula works great....

    Now i've applied the formula to live data, i've noticed that some postcode can match but the school & student can have still have different 'address 1' details.

    As a double check is it possible to have a 2nd formula in column G, that would work on the same principle but match the 'Address 1' fields instead of postcode this time.

    Many Thanks

  4. #4
    Forum Guru benishiryo's Avatar
    Join Date
    03-25-2011
    Location
    Singapore
    MS-Off Ver
    Excel 2013
    Posts
    5,156

    Re: looking at two sheets & show matching records

    hi PW6780, you may then try this array formula. copy this formula & paste inside the formula bar of F2:
    =IFERROR(INDEX(Schools!$A$2:$A$12,MATCH(B2&E2,Schools!$B$2:$B$12&Schools!$E$2:$E$12,0)),"")

    press CTRL + SHIFT + ENTER to confirm.

    Thanks, if you have clicked on the * and added our rep.

    If you're satisfied with the answer, click Thread Tools above your first post, select "Mark your thread as Solved".

    "Contentment is not the fulfillment of what you want, but the realization of what you already have."


    Tips & Tutorials I Compiled | How to Get Quick & Good Answers

  5. #5
    Valued Forum Contributor
    Join Date
    08-14-2012
    Location
    India
    MS-Off Ver
    Excel 2007
    Posts
    573

    Re: looking at two sheets & show matching records

    @PW6780: For matching address, you can just change the cell references accordingly.
    Formula: copy to clipboard
    =IFERROR(INDEX(Schools!A:A,MATCH(Students.!B2,Schools!B:B,0)),"")

+ 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