Using XLookup or related formulas to look up information on one sheet and put in a column on another

%3CLINGO-SUB%20id%3D%22lingo-sub-1619764%22%20slang%3D%22en-US%22%3EUsing%20XLookup%20or%20related%20formulas%20to%20look%20up%20information%20on%20one%20sheet%20and%20put%20in%20a%20column%20on%20another%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-1619764%22%20slang%3D%22en-US%22%3E%3CP%3EI%20have%20lists%20of%20students%20alphabetically%20by%20grade%20level.%20From%20another%20system%2C%20I%20get%20lists%20of%20all%20students%2C%20past%20and%20present%2C%20alphabetically%20by%20their%20library%20%23.%20I%20need%20to%20be%20able%20to%20take%20the%20barcode%20from%20my%20second%20sheet%20with%20the%20barcodes%20and%20put%20in%20the%20first%20sheet%20of%20my%20students.%26nbsp%3B%26nbsp%3B%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EI%20have%20a%20terrible%20time%20trying%20to%20do%20this.%26nbsp%3B%20I%20have%20tried%20xlookup%2C%20nested%20x%20lookup%2C%20vlookup%2C%20index%20and%20match.%26nbsp%3B%20I%20feel%20like%20this%20should%20be%20simple%2C%20however%20I%20can't%20get%20this%20to%20work.%26nbsp%3B%20I%20arrange%20things%20with%20headers%20like%20Name%2C%20ID%20Number%2C%20library%20%23%2C%20Grade%2C%20etc.%26nbsp%3B%26nbsp%3B%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EI%20need%20to%20be%20able%20to%20look%20up%20every%20student%20by%20name%20and%20find%20the%20matching%20library%20%23.%26nbsp%3B%26nbsp%3B%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EHow%20can%20I%20best%20accomplish%20this%3F%20I%20use%20excel%20on%20mac.%26nbsp%3B%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-LABS%20id%3D%22lingo-labs-1619764%22%20slang%3D%22en-US%22%3E%3CLINGO-LABEL%3EExcel%3C%2FLINGO-LABEL%3E%3CLINGO-LABEL%3EExcel%20on%20Mac%3C%2FLINGO-LABEL%3E%3CLINGO-LABEL%3EFormulas%20and%20Functions%3C%2FLINGO-LABEL%3E%3C%2FLINGO-LABS%3E%3CLINGO-SUB%20id%3D%22lingo-sub-1621246%22%20slang%3D%22en-US%22%3ERe%3A%20Using%20XLookup%20or%20related%20formulas%20to%20look%20up%20information%20on%20one%20sheet%20and%20put%20in%20a%20column%20on%20ano%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-1621246%22%20slang%3D%22en-US%22%3E%3CP%3E%3CA%20href%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F774950%22%20target%3D%22_blank%22%3E%40ABirdLibrary%3C%2FA%3E%26nbsp%3BDo%20you%20get%20errors%20or%20do%20the%20formulae%20that%20you%20tried%20not%20return%20matching%20records%3F%20Could%20be%20that%20the%20lookup%20values%20in%20the%20current%20student%20listing%20are%20not%20%3CSTRONG%3Eexactly%3C%2FSTRONG%3E%20the%20same%20as%20in%20the%20list%20from%20the%20other%20system%20(e.g.%20leading%20or%20trailing%20spaces)%20or%20it%20could%20be%20a%20formatting%20issue%20(number%20vs.%20text).%3C%2FP%3E%3CP%3EWithout%20an%20example%20you%20both%20lists%2C%20it's%20difficult%20to%20know%20what's%20causing%20the%20problem.%20Be%20ware%20no%20to%20share%20any%20private%20and%20confidential%20information%20(like%20names%20and%20addresses%20of%20real%20people)%20in%20case%20you%20choose%20to%20upload%20files%20here.%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-1623524%22%20slang%3D%22en-US%22%3ERe%3A%20Using%20XLookup%20or%20related%20formulas%20to%20look%20up%20information%20on%20one%20sheet%20and%20put%20in%20a%20column%20on%20ano%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-1623524%22%20slang%3D%22en-US%22%3E%3CP%3EHere%20is%20an%20example.%26nbsp%3B%20I%20just%20usually%20get%20NA.%26nbsp%3B%20I%20have%20tried%20using%20xlookup%20nested%20within%2C%20vlookup%2C%20etc.%20But%20it%20never%20seems%20to%20work.%26nbsp%3B%26nbsp%3B%3CA%20href%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F403176%22%20target%3D%22_blank%22%3E%40Riny_van_Eekelen%3C%2FA%3E%26nbsp%3B%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-1623613%22%20slang%3D%22en-US%22%3ERe%3A%20Using%20XLookup%20or%20related%20formulas%20to%20look%20up%20information%20on%20one%20sheet%20and%20put%20in%20a%20column%20on%20ano%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-1623613%22%20slang%3D%22en-US%22%3E%3CP%3E%3CA%20href%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F774950%22%20target%3D%22_blank%22%3E%40ABirdLibrary%3C%2FA%3E%26nbsp%3BThe%20problem%20is%20what%20you%20are%20feeding%20the%20XLOOKUP()%20function.%26nbsp%3B%20Here%20is%20the%20formula%20you%20want%20in%20the%20example%3A%3C%2FP%3E%3CPRE%20class%3D%22lia-code-sample%20language-excel%22%3E%3CCODE%3E%3DXLOOKUP(C2%3AC6%2C'student%20library%20%23'!C%3AC%2C'student%20library%20%23'!D%3AD)%3C%2FCODE%3E%3C%2FPRE%3E%3CP%3EThe%20%22lookup_value%22%20is%20the%20value%20you%20are%20using%20to%20match%20the%20corresponding%20row%20in%20the%20other%20table.%26nbsp%3B%20In%20this%20case%20it%20is%20Student%20Name.%26nbsp%3B%20I%20used%20C2%3AC6%20to%20create%20a%20dynamic%20array%20that%20will%20automatically%20fill%20down%20for%20all%20those%20rows%20but%20you%20could%20use%20C2%20and%20then%20copy%20or%20fill%20down%20to%20insert%20the%20corresponding%20formula%20in%20each%20row.%3C%2FP%3E%3CP%3EI%20hope%20that%20helps.%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-1623782%22%20slang%3D%22en-US%22%3ERe%3A%20Using%20XLookup%20or%20related%20formulas%20to%20look%20up%20information%20on%20one%20sheet%20and%20put%20in%20a%20column%20on%20ano%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-1623782%22%20slang%3D%22en-US%22%3E%3CP%3EThank%20you%20so%20much!%20That%20really%20did%20help%2C%3CA%20href%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F570951%22%20target%3D%22_blank%22%3E%40mtarler%3C%2FA%3E%26nbsp%3B%3C%2FP%3E%3C%2FLINGO-BODY%3E
New Contributor

I have lists of students alphabetically by grade level. From another system, I get lists of all students, past and present, alphabetically by their library #. I need to be able to take the barcode from my second sheet with the barcodes and put in the first sheet of my students.  

 

I have a terrible time trying to do this.  I have tried xlookup, nested x lookup, vlookup, index and match.  I feel like this should be simple, however I can't get this to work.  I arrange things with headers like Name, ID Number, library #, Grade, etc.  

 

I need to be able to look up every student by name and find the matching library #.  

 

How can I best accomplish this? I use excel on mac. 

4 Replies

@ABirdLibrary Do you get errors or do the formulae that you tried not return matching records? Could be that the lookup values in the current student listing are not exactly the same as in the list from the other system (e.g. leading or trailing spaces) or it could be a formatting issue (number vs. text).

Without an example you both lists, it's difficult to know what's causing the problem. Be ware no to share any private and confidential information (like names and addresses of real people) in case you choose to upload files here.

Here is an example.  I just usually get NA.  I have tried using xlookup nested within, vlookup, etc. But it never seems to work.  @Riny_van_Eekelen 

@ABirdLibrary The problem is what you are feeding the XLOOKUP() function.  Here is the formula you want in the example:

=XLOOKUP(C2:C6,'student library #'!C:C,'student library #'!D:D)

The "lookup_value" is the value you are using to match the corresponding row in the other table.  In this case it is Student Name.  I used C2:C6 to create a dynamic array that will automatically fill down for all those rows but you could use C2 and then copy or fill down to insert the corresponding formula in each row.

I hope that helps.