Forum Discussion

dylan_a16's avatar
dylan_a16
Copper Contributor
May 08, 2023
Solved

If Cell on Sheet 1 & 2 match, copy cell on Sheet 2 to a new cell on Sheet 1

Sheet 1 has a list of company payments. Sheet 2 has a list of companies and their main contacts.

 

I am looking for a formula for the following statement:

If the company name in column A on sheet 1 matches a company name in column A on sheet two, then the email (column D) for that company's contact on sheet 2 will be copied to column I on sheet.   

 

Example Workbook:

https://1drv.ms/x/s!AoT8FtinyGcngR3nil0Ni8uSR5CE?e=o3bVSp 

3 Replies

  • dylan_a16 

    If you have Microsoft 365 or Office 2021, enter the following formula in I3:

     

    =XLOOKUP(A3:A10,Sheet2!A:A,Sheet2!D:D,"")

     

    This will automatically spill to the rows below.

    If you have an older version, use

     

    =IFERROR(VLOOKUP(A3,Sheet2!A:D,4,FALSE),"")

     

    and fill down to I10.

  • dylan_a16 

    =INDEX(Sheet2!$D$2:$D$13,MATCH(Sheet1!A3,Sheet2!$A$2:$A$13,0))

    You can try INDEX and MATCH.

     

    Sheet1: 

    Sheet2:

Resources