Copy relational records from one workbook to another

%3CLINGO-SUB%20id%3D%22lingo-sub-2891926%22%20slang%3D%22en-US%22%3ECopy%20relational%20records%20from%20one%20workbook%20to%20another%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-2891926%22%20slang%3D%22en-US%22%3E%3CP%3EI%20have%20some%20records%20in%20a%20workbook%20that%20I%20need%20to%20copy%20into%20a%20new%20workbook%20that%20has%20records%20in%20it%20already.%20I%20have%20an%20id%20column%20in%20both%20workbooks%2C%20however%2C%20I%20can't%20just%20easily%20copy%20and%20paste%20because%20target%20records%20have%20extra%20records.%20I%20need%20to%20copy%20my%20source%20records%20to%20target%20based%20on%20related%20id.%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EIs%20there%20an%20easy%20way%20to%20do%20this%20because%20there%20are%20hundreds%20and%20I%20don't%20want%20to%20do%20it%20manually%20if%20I%20can%20help%20it%20or%20if%20you%20can%20help%20it%2C%20lol.%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-LABS%20id%3D%22lingo-labs-2891926%22%20slang%3D%22en-US%22%3E%3CLINGO-LABEL%3EExcel%3C%2FLINGO-LABEL%3E%3CLINGO-LABEL%3EFormulas%20and%20Functions%3C%2FLINGO-LABEL%3E%3CLINGO-LABEL%3EMacros%20and%20VBA%3C%2FLINGO-LABEL%3E%3C%2FLINGO-LABS%3E%3CLINGO-SUB%20id%3D%22lingo-sub-2892537%22%20slang%3D%22en-US%22%3ERe%3A%20Copy%20relational%20records%20from%20one%20workbook%20to%20another%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-2892537%22%20slang%3D%22en-US%22%3E%3CP%3E%3CA%20href%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F1165219%22%20target%3D%22_blank%22%3E%40rodsan724%3C%2FA%3E%26nbsp%3B%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EIt's%20not%20altogether%20clear%20what%20you're%20trying%20to%20do%20(yes%2C%20I%20know%2C%20copy%20some%20records%20to%20another%20sheet%20based%20on%20ID)%2C%20but%20the%20nature%20of%20the%20task%20has%20some%20unspoken%20assumptions%2C%20I%20think.%20Are%20you%20making%20more%20complete%20the%20partial%20records%20associated%20with%20some%20or%20all%20of%20the%20IDs%3F%20Or%20are%20you%20adding%20altogether%20new%20records%20of%20unique%20IDs%3F%20Etc.%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EAnyway%2C%20I%20pull%20records%20from%20one%20spreadsheet%20into%20another%20using%20the%20%3CSTRONG%3EFILTER%3C%2FSTRONG%3E%20function.%20And%20you%20can%20further%20enhance%20or%20focus%20it%20with%20%3CSTRONG%3EUNIQUE%3C%2FSTRONG%3E.%20Both%20of%20these%20new%20%22Dynamic%20Array%22%20functions%20require%20the%20newest%20version%20of%20Excel.%20Here's%20a%20link%20to%20a%20YouTube%20video%20launched%20by%20Microsoft%20to%20explain%20the%20functions.%20See%20if%20it%20points%20you%20in%20a%20productive%20direction.%20%26nbsp%3B%3CA%20href%3D%22https%3A%2F%2Fwww.youtube.com%2Fwatch%3Fv%3D9I9DtFOVPIg%22%20target%3D%22_blank%22%20rel%3D%22nofollow%20noopener%20noreferrer%22%3Ehttps%3A%2F%2Fwww.youtube.com%2Fwatch%3Fv%3D9I9DtFOVPIg%3C%2FA%3E%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-2893370%22%20slang%3D%22en-US%22%3ERe%3A%20Copy%20relational%20records%20from%20one%20workbook%20to%20another%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-2893370%22%20slang%3D%22en-US%22%3ESorry%20for%20confusion%2C%20I%20updated%20OP%20with%20an%20illustration.%3C%2FLINGO-BODY%3E
Contributor

I have some records in a workbook that I need to copy into a new workbook that has records in it already. I have an id column in both workbooks, however, I can't just easily copy and paste because target records have extra records. I need to copy my source records to target based on related id.

 

Is there an easy way to do this because there are hundreds and I don't want to do it manually if I can help it or if you can help it, lol.

 

rodsan724_0-1635379057161.png

 

3 Replies

@rodsan724 

 

It's not altogether clear what you're trying to do (yes, I know, copy some records to another sheet based on ID), but the nature of the task has some unspoken assumptions, I think. Are you making more complete the partial records associated with some or all of the IDs? Or are you adding altogether new records of unique IDs? Etc.

 

Anyway, I pull records from one spreadsheet into another using the FILTER function. And you can further enhance or focus it with UNIQUE. Both of these new "Dynamic Array" functions require the newest version of Excel. Here's a link to a YouTube video launched by Microsoft to explain the functions. See if it points you in a productive direction.  https://www.youtube.com/watch?v=9I9DtFOVPIg

 

Sorry for confusion, I updated OP with an illustration.

@rodsan724 

 

I'm actually more confused based on that illustration. There doesn't seem to be a "relatedness" between the IDs, other than first digits (which is NOT what I'd call a real relationship). [Speaking as a person who had responsibility for the HR/Payroll database of a major corporation, so I do know relational databases, IDs and keys to a table and how to join them......]

 

That said, did you take a look at the video regarding FILTER? If so, does it offer any possibilities? If not, please explain further how these various records are related and what the bigger context is. And, since you appear to have gone to the trouble of creating actual spreadsheets to form the basis of the image, would you be able to post actual spreadsheets that are more complete mock-ups of the real situation? Actual spreadsheets are far more useful than an image.