+ Reply to Thread
Results 1 to 2 of 2

Comparing and referencing to data

  1. #1
    Registered User
    Join Date
    05-22-2011
    Location
    India
    MS-Off Ver
    Excel 2007
    Posts
    1

    Comparing and referencing to data

    Hi All,

    I have a sheet in which one column needs to be populated based on data of two columns. The scenario is :

    Sheet1
    column1(M) column2(P) column3(B)
    M1 P1
    M2 P1
    M1 P2

    Sheet2
    column1(M) column2(P) column3(B)
    M1 P1 B1
    M2 P1 B2
    M1 P2 B3

    Now, based on info given in sheet 2, coumn3 needs to be populated and if no match is found user is asked to enter data in sheet2 first and then proceed in sheet1.

    Please help me to do this.

  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
    44,694

    Re: Comparing and referencing to data

    In cell B2 on Sheet 1, put the array entered formula:

    =IFERROR(INDEX(Sheet2!B:B,MATCH(M2&P2,Sheet2!M:M&Sheet2!P:P,0)),"Enter Data in Sheet 2")

    and drag down.

    This is input with Control-Shift-Enter rather than just Enter. If done correctly, the formula will appear as:

    (=IFERROR(INDEX(Sheet2!B:B,MATCH(M2&P2,Sheet2!M:M&Sheet2!P:P,0)),"Enter Data in Sheet ")}


    Regards
    Attached Files Attached Files
    Last edited by TMS; 05-22-2011 at 08:38 PM. Reason: Add attachment
    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


+ 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