Excel: Inserting values from one table into another based on a primary key relationship

%3CLINGO-SUB%20id%3D%22lingo-sub-1570111%22%20slang%3D%22en-US%22%3EExcel%3A%20Inserting%20values%20from%20one%20table%20into%20another%20based%20on%20a%20primary%20key%20relationship%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-1570111%22%20slang%3D%22en-US%22%3E%3CP%3EHi%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3ESo%20I%20have%20two%20excel%20sheets%20or%20tables%20%2C%20Donor%20and%20Gift%20%2C%201%20Doner%20may%20give%200-M%20Gifts%2C%20the%20two%20tables%20are%20linked%20by%20email%20address%20which%20is%20unique%20in%20the%20Donor%20Table.%20I%20want%20to%20add%20Name%20from%20the%20Donor%20Table%20to%20the%20Gift%20table%20based%20on%20the%20email%20address.%26nbsp%3B%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EI%20have%20created%20the%20two%20tables%20(from%20base%20CSV%20files)%20in%20Excel%20and%20linked%20them%20via%20email%20address%20using%20the%20Relationships%20function%20and%20that%20is%20all%20good.%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EProblem%3C%2FP%3E%3CP%3EI%20am%20at%20a%20loss%20to%20work%20out%20the%20function%20required%20to%20insert%20the%20name%20value%20from%20the%20Name%20field%20from%20the%20Donor%20table%20into%20the%20Name%20field%20in%20the%20Gift%20table%20based%20on%20the%20email%20address%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3ENotes%20%3A%20all%20records%20in%20the%20Donor%20table%20have%20a%20valid%20name%20and%20email%2C%20the%20name%20field%20in%20the%20Gift%20table%20is%20null%20or%20blank%26nbsp%3B%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EThanks%20for%20your%20help%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-LABS%20id%3D%22lingo-labs-1570111%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%3EPower%20BI%3C%2FLINGO-LABEL%3E%3C%2FLINGO-LABS%3E%3CLINGO-SUB%20id%3D%22lingo-sub-1570179%22%20slang%3D%22en-US%22%3ERe%3A%20Excel%3A%20Inserting%20values%20from%20one%20table%20into%20another%20based%20on%20a%20primary%20key%20relationship%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-1570179%22%20slang%3D%22en-US%22%3E%3CP%3E%3CA%20href%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F751161%22%20target%3D%22_blank%22%3E%40Zenstone65%3C%2FA%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3EIf%20that's%20for%20Excel%20Table%20you%20may%20use%20INDEX%2FMATCH%20or%20XLOOKUP%20or%20like.%3C%2FP%3E%0A%3CP%3EIf%20in%20data%20model%20table%20with%20PowerPivot%20you%20may%20use%20RELATED().%3C%2FP%3E%0A%3CP%3EIf%20Power%20Query%20table%20you%20may%20merge.%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3EWhat%20is%20the%20scenario%3F%3C%2FP%3E%3C%2FLINGO-BODY%3E
Highlighted
Occasional Visitor

Hi

 

So I have two excel sheets or tables , Donor and Gift , 1 Doner may give 0-M Gifts, the two tables are linked by email address which is unique in the Donor Table. I want to add Name from the Donor Table to the Gift table based on the email address. 

 

I have created the two tables (from base CSV files) in Excel and linked them via email address using the Relationships function and that is all good.

 

Problem

I am at a loss to work out the function required to insert the name value from the Name field from the Donor table into the Name field in the Gift table based on the email address

 

Notes : all records in the Donor table have a valid name and email, the name field in the Gift table is null or blank 

 

Thanks for your help

1 Reply
Highlighted

@Zenstone65 

If that's for Excel Table you may use INDEX/MATCH or XLOOKUP or like.

If in data model table with PowerPivot you may use RELATED().

If Power Query table you may merge.

 

What is the scenario?