Forum Discussion

Zenstone65's avatar
Zenstone65
Copper Contributor
Aug 06, 2020

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

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

  • SergeiBaklan's avatar
    SergeiBaklan
    Diamond Contributor

    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?

Resources