XLOOKUP HELP IN EXCEL

%3CLINGO-SUB%20id%3D%22lingo-sub-1969253%22%20slang%3D%22en-US%22%3EXLOOKUP%20HELP%20IN%20EXCEL%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-1969253%22%20slang%3D%22en-US%22%3E%3CDIV%20class%3D%22lia-message-subject-wrapper%20lia-component-subject%20lia-component-message-view-widget-subject-with-options%22%3E%3CSPAN%3EI%20have%20a%20problem%20in%20which%20I%20am%20in%20need%20of%20some%20assistance.%20I%20am%20trying%20to%20merge%20information%20from%202%20workbooks%20together.%3C%2FSPAN%3E%3C%2FDIV%3E%3CDIV%20class%3D%22lia-message-body%20lia-component-message-view-widget-body%20lia-component-body-signature-highlight-escalation%20lia-component-message-view-widget-body-signature-highlight-escalation%22%3E%3CDIV%20class%3D%22lia-message-body-content%22%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EHere%20is%20what%20I%20need%3A%3C%2FP%3E%3CP%3ETake%20a%20column%20of%20comments%20pertaining%20to%20order%20information%20in%203%20separate%20columns%20(order%23%2C%20line%231%2C%20line%232)%20and%20merge%20those%20comments%20into%20another%20existing%20workbook.%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EI%20tried%20using%20Xlookup%20but%20the%20information%20isn't%20always%20transferring%20over%20properly%20because%20the%20same%20order%20number%20may%20apply%20to%20multiple%20line%23's%20in%20the%20order.%20I%20need%20the%20notes%20column%20to%20transfer%20according%20to%20the%20row%20that%20matches%20order%23%2C%20line%231%20and%20line%232.%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EIs%20there%20a%20way%20when%20using%20xlookup%20to%20have%20a%20range%20that%20is%20being%20searched%20under%20lookup_value%3F%20Or%20another%20way%20to%20transfer%20this%20information%20to%20save%20time%20from%20manually%20inputting%20it.%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EThank%20you%3C%2FP%3E%3C%2FDIV%3E%3C%2FDIV%3E%3C%2FLINGO-BODY%3E%3CLINGO-LABS%20id%3D%22lingo-labs-1969253%22%20slang%3D%22en-US%22%3E%3CLINGO-LABEL%3EBI%20%26amp%3B%20Data%20Analysis%3C%2FLINGO-LABEL%3E%3CLINGO-LABEL%3EExcel%3C%2FLINGO-LABEL%3E%3CLINGO-LABEL%3EFormulas%20and%20Functions%3C%2FLINGO-LABEL%3E%3C%2FLINGO-LABS%3E%3CLINGO-SUB%20id%3D%22lingo-sub-1971883%22%20slang%3D%22en-US%22%3ERe%3A%20XLOOKUP%20HELP%20IN%20EXCEL%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-1971883%22%20slang%3D%22en-US%22%3E%3CP%3E%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%3CP%3E%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%20lia-image-align-inline%22%20image-alt%3D%22bcook02_0-1607530236100.png%22%20style%3D%22width%3A%20400px%3B%22%3E%3CIMG%20src%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fimage%2Fserverpage%2Fimage-id%2F239060i39F373D4B160370C%2Fimage-size%2Fmedium%3Fv%3D1.0%26amp%3Bpx%3D400%22%20role%3D%22button%22%20title%3D%22bcook02_0-1607530236100.png%22%20alt%3D%22bcook02_0-1607530236100.png%22%20%2F%3E%3C%2FSPAN%3E%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EI%20hope%20this%20helps%20explain%20things%20better.%20I%20export%20the%20data%20daily%20into%20Excel%20for%20various%20orders.%20What%20I%20am%20needing%20to%20do%20is%20transfer%20the%20comments%20from%20Workbook1%20to%20Workbook%202%20properly.%20I%20can%20reference%20the%20order%20number%20in%20the%20XLOOKUP%20but%20this%20won't%20necessarily%20transfer%20the%20comments%20properly%20because%20there%20may%20be%20more%20than%20one%20comment%20for%20each%20order%20%23.%26nbsp%3B%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EExample%3A%26nbsp%3B%3C%2FP%3E%3CP%3EOrder%20%23124%20has%203%20comments%20because%20of%20the%20different%20part%20numbers%20but%20I%20need%20to%20transfer%20the%20comments%20based%20on%20the%20Order%23%2C%20PO%20Item%20%26amp%3B%20Scheduled%20Quantity%2C%20not%20solely%20just%20based%20on%20the%20order%20number.%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-1972159%22%20slang%3D%22en-US%22%3ERe%3A%20XLOOKUP%20HELP%20IN%20EXCEL%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-1972159%22%20slang%3D%22en-US%22%3E%3CP%3E%3CA%20href%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F895406%22%20target%3D%22_blank%22%3E%40bcook02%3C%2FA%3E%26nbsp%3BHave%20a%20look%20at%20the%20attached%20simplified%20example.%20It%20demonstrates%20how%20you%20can%20join%20two%20lookup%20elements%20to%20create%20unique%20lookup%20values.%20Perhaps%20you%20can%20apply%20it%20to%20your%20own%20schedule.%3C%2FP%3E%3C%2FLINGO-BODY%3E
New Contributor
I have a problem in which I am in need of some assistance. I am trying to merge information from 2 workbooks together.

 

Here is what I need:

Take a column of comments pertaining to order information in 3 separate columns (order#, line#1, line#2) and merge those comments into another existing workbook.

 

I tried using Xlookup but the information isn't always transferring over properly because the same order number may apply to multiple line#'s in the order. I need the notes column to transfer according to the row that matches order#, line#1 and line#2.

 

Is there a way when using xlookup to have a range that is being searched under lookup_value? Or another way to transfer this information to save time from manually inputting it.

 

Thank you

6 Replies

@bcook02 Difficult to visualise how your data is structured exactly, but you may want to look into the FILTER function in stead. Otherwise, upload a representative samples of your workbooks (eliminate any private or confidential information), noting which data should be shown where.

@Riny_van_Eekelen 

bcook02_0-1607530236100.png

 

I hope this helps explain things better. I export the data daily into Excel for various orders. What I am needing to do is transfer the comments from Workbook1 to Workbook 2 properly. I can reference the order number in the XLOOKUP but this won't necessarily transfer the comments properly because there may be more than one comment for each order #. 

 

Example: 

Order #124 has 3 comments because of the different part numbers but I need to transfer the comments based on the Order#, PO Item & Scheduled Quantity, not solely just based on the order number.

@bcook02 Have a look at the attached simplified example. It demonstrates how you can join two lookup elements to create unique lookup values. Perhaps you can apply it to your own schedule.

@Riny_van_Eekelen 

Thank you for that simplified XLOOKUP version. How would this be coded to pull data from one Excel file to another?

@bcook02 If you have both workbooks open, you should be able to just follow all the steps and click between the workbooks to insert the lookup ranges and the return ranges. All I wanted to demonstrate is that you can use the &-sign to combine lookup values and lookup ranges.

@Riny_van_Eekelen 

Thank you for your assistance!